Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default ActiveCell.FormulaR1C1

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default ActiveCell.FormulaR1C1

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default ActiveCell.FormulaR1C1

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default ActiveCell.FormulaR1C1

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveCell.FormulaR1C1 Rick Excel Discussion (Misc queries) 3 March 28th 10 10:36 PM
ActiveCell.FormulaR1C1 SteveDB1 Excel Programming 4 March 28th 08 02:55 PM
ActiveCell.FormulaR1C1 PapaDos Excel Programming 0 December 7th 06 07:06 AM
ActiveCell.FormulaR1C1 Tom Ogilvy Excel Programming 0 December 6th 06 08:03 PM
ActiveCell.FormulaR1C1 Leif Rasmussen Excel Programming 1 October 16th 03 09:46 AM


All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"