Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following lines in my code:
ActiveCell.FormulaR1C1 = "=IF(RC[6]=""AA"",""ST"",""EA"")" Range("D2").Select This sets the value of one cell to ST if another equals AA, if not it sets the value to EA. I have now found that AA may be AA or AB or AX but I still need the second cell to be set to ST or EA, how do I do this? -- Thanks Slohcin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.FormulaR1C1 =
"=IF(OR(RC[6]=""AA"",RC[6]=""AB"",RC[6]=""AX""),""ST"",""EA"")" "Slohcin" wrote: I have the following lines in my code: ActiveCell.FormulaR1C1 = "=IF(RC[6]=""AA"",""ST"",""EA"")" Range("D2").Select This sets the value of one cell to ST if another equals AA, if not it sets the value to EA. I have now found that AA may be AA or AB or AX but I still need the second cell to be set to ST or EA, how do I do this? -- Thanks Slohcin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks Sam for your quick response and solution.
-- Thanks Slohcin "Sam Wilson" wrote: ActiveCell.FormulaR1C1 = "=IF(OR(RC[6]=""AA"",RC[6]=""AB"",RC[6]=""AX""),""ST"",""EA"")" "Slohcin" wrote: I have the following lines in my code: ActiveCell.FormulaR1C1 = "=IF(RC[6]=""AA"",""ST"",""EA"")" Range("D2").Select This sets the value of one cell to ST if another equals AA, if not it sets the value to EA. I have now found that AA may be AA or AB or AX but I still need the second cell to be set to ST or EA, how do I do this? -- Thanks Slohcin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another one that is a little easier to update if/when things change:
ActiveCell.FormulaR1C1 _ = "=IF(OR(RC[6]={""AA"",""AB"",""AX""}),""ST"",""EA"")" Slohcin wrote: I have the following lines in my code: ActiveCell.FormulaR1C1 = "=IF(RC[6]=""AA"",""ST"",""EA"")" Range("D2").Select This sets the value of one cell to ST if another equals AA, if not it sets the value to EA. I have now found that AA may be AA or AB or AX but I still need the second cell to be set to ST or EA, how do I do this? -- Thanks Slohcin -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ActiveCell.FormulaR1C1 | Excel Discussion (Misc queries) | |||
ActiveCell.FormulaR1C1 | Excel Programming | |||
ActiveCell.FormulaR1C1 | Excel Programming | |||
ActiveCell.FormulaR1C1 | Excel Programming | |||
ActiveCell.FormulaR1C1 | Excel Programming |