Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I have a macro that pastes a set of formula in a spreasheet and I'm receiving an "End of Statement" error when the macro runs. The code looks like this: Range("B2").Select ActiveCell.FormulaR1C1 = _ "=IF(("A2")<("A3"),""000"",IF((MID(E2,3,1))=""S"" ,(MID(E2,5,3)),""000""))" Where I'm trying to compare cell A2 < A3, etc., etc. Why doesn't it like this??? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm guessing maybe this is what you meant?
"=IF((A2)<(A3),""000"",IF((MID(E2,3,1))=""S"",(MI D(E2,5,3)),""000""))" -- Tim Williams Palo Alto, CA "Lacey" wrote in message ... Hi! I have a macro that pastes a set of formula in a spreasheet and I'm receiving an "End of Statement" error when the macro runs. The code looks like this: Range("B2").Select ActiveCell.FormulaR1C1 = _ "=IF(("A2")<("A3"),""000"",IF((MID(E2,3,1))=""S"" ,(MID(E2,5,3)),""000""))" Where I'm trying to compare cell A2 < A3, etc., etc. Why doesn't it like this??? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get a syntax error when I use (A2)< (A3). It doesn't like the ( ). Any
suggestions? "Tim Williams" wrote: I'm guessing maybe this is what you meant? "=IF((A2)<(A3),""000"",IF((MID(E2,3,1))=""S"",(MI D(E2,5,3)),""000""))" -- Tim Williams Palo Alto, CA "Lacey" wrote in message ... Hi! I have a macro that pastes a set of formula in a spreasheet and I'm receiving an "End of Statement" error when the macro runs. The code looks like this: Range("B2").Select ActiveCell.FormulaR1C1 = _ "=IF(("A2")<("A3"),""000"",IF((MID(E2,3,1))=""S"" ,(MID(E2,5,3)),""000""))" Where I'm trying to compare cell A2 < A3, etc., etc. Why doesn't it like this??? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
..formulaR1C1 likes R1C1 reference style.
..formula likes A1 reference style You have a followup post at your original thread. Lacey wrote: Hi! I have a macro that pastes a set of formula in a spreasheet and I'm receiving an "End of Statement" error when the macro runs. The code looks like this: Range("B2").Select ActiveCell.FormulaR1C1 = _ "=IF(("A2")<("A3"),""000"",IF((MID(E2,3,1))=""S"" ,(MID(E2,5,3)),""000""))" Where I'm trying to compare cell A2 < A3, etc., etc. Why doesn't it like this??? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
R1C1 and A1 style conflict in formula problem | Excel Programming | |||
UserForm R1C1 problem | Excel Programming | |||
Range R1C1 notation & the problem with my Macro | Excel Programming | |||
looping formula - r1c1 problem - Con't | Excel Programming | |||
looping formula - r1c1 problem | Excel Programming |