I want to put the following formula in a cell with Excel VBA. (Tentatively process the 4th line)
"= IF (S4 = 0, L4-N4, ROUNDDOWN (O4 * ROUNDDOWN (K4,3), 0)"
The problem is described below, so if you have any questions, would you please teach me?
Corresponding source code
Run-time error '1004' Application definition or object definition error.
What I tried
With sheet object name .Cells (4, 16) .FormulaLocal = "= IF ("&.Cells (4, 19) .Address (False, False)&"= 0,"&.Cells (4, 12) .Address (False, False) )&"-"&.Cells (4, 14) .Address (False, False)&", ROUNDDOWN ("&.Cells (4, 15) .Address (False, False)&"* ROUNDDOWN ("&.Cells (4, 11) .Address (False, False)&", 3), 0)" End With
I tried the cell to be assigned with the following properties, but all of them gave the same error.
- Add no properties
I tried to enter "= IF (S4 = 0, L4-N4, ROUNDDOWN (O4 * ROUNDDOWN (K4,3), 0)" directly as a character string, but the same error occurred.Supplementary information (FW/tool version, etc.)
Please provide more detailed information here.
Answer # 1
One right parenthesis was missing, and when I fixed it, it worked without error.
= IF (S4 = 0, L4-N4, ROUNDDOWN (O4 * ROUNDDOWN (K4,3), 0))
Answer # 2
Check the expression you are trying to assign with a string.
Is what you are developing as a value meaningful in the first place?
- css - i want to put two images and text side by side on the homepage
- i want to put data in csv in active directory with cmd
- swift - i want to save a custom cell using ud
- i want to display the user name when it is read-only in vba
- i want to use vba to edit the formulas displayed in the formula editor of excel or word
- java - i want to put a value in the field
- css - i want to put text under the image
- i want to manage filters with vba
- html - i want to put a line on the left and right of the text
- database design - do you want to put nlll in the table by default?
- i want to put docker on linux in vps
- python - i want to put a semicolon at the end of the list
- java - i want to put the date selected with in the textarea
- css - i want to put dots in the background of wavy lines with svg
- vba - i want to save only one page as a pdf
- vba - i want to save in xls format
- i want to move the loop sheet with vba
- ios - i want to put an image in uibutton
- html - i want to put a p tag under the input tag
- vba dictionary is it possible to have multiple items for one key?
- please tell me how to use the excel vba split function macro well
- i get a compile error during vba processing
- i want to get information from internet explorer with excel vba macro
- how to post from workbook to workbook using vba macros
- initialization before vba posting
- vba - i want to post from workbook to workbook with a macro, but i get the error message "the class does not support automa
- vba - workbook is not displayed during macro autorun in excel365 auto_open
- i want to use excelvba to send emails to multiple contacts at once while changing the text content and destination
- how to make macro work properly with the folder path set in the vba cell