Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default IF Statement in a macro:

IF Statement in a macro:

If value in D7 is greater than value in F7, then indicate "UP" in O7.
If value in D7 is less than value in F7, then indicate "DOWN" in O7.

If value in D8 is greater than value in F8, then indicate "UP" in O8.
If value in D8 is less than value in F8, then indicate "DOWN" in O8.

This should be done for each cell in column O starting from O7 going
down.

I'm trying to include this IF statement in a macro I already have.

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default IF Statement in a macro:

Sub UpDown()
Range("O7:O" &
Range("O7").End(xlDown).Row).FormulaR1C1="=IF(rc4 rc6,""UP"",IF(rc4<rc6,""DOWN"",""""))"
End Sub

"Damil4real" wrote in message
...
IF Statement in a macro:

If value in D7 is greater than value in F7, then indicate "UP" in O7.
If value in D7 is less than value in F7, then indicate "DOWN" in O7.

If value in D8 is greater than value in F8, then indicate "UP" in O8.
If value in D8 is less than value in F8, then indicate "DOWN" in O8.

This should be done for each cell in column O starting from O7 going
down.

I'm trying to include this IF statement in a macro I already have.

Thanks for your help!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default IF Statement in a macro:

On Aug 12, 11:15*am, "Bob Umlas" wrote:
Sub UpDown()
* *Range("O7:O" &
Range("O7").End(xlDown).Row).FormulaR1C1="=IF(rc4 rc6,""UP"",IF(rc4<rc6,""D*OWN"",""""))"
End Sub

"Damil4real" wrote in message

...



IF Statement in a macro:


If value in D7 is greater than value in F7, then indicate "UP" in O7.
If value in D7 is less than value in F7, then indicate "DOWN" in O7.


If value in D8 is greater than value in F8, then indicate "UP" in O8.
If value in D8 is less than value in F8, then indicate "DOWN" in O8.


This should be done for each cell in column O starting from O7 going
down.


I'm trying to include this IF statement in a macro I already have.


Thanks for your help!- Hide quoted text -


- Show quoted text -


Thanks a lot!

What about if you want the backgroud color of the cell to change to
blue if the value in cell H7 is greater than D7. Red color if the
value in H7 is less than D7. Code copy down column H starting from H7.
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
Macro if and / or statement orquidea Excel Discussion (Misc queries) 4 April 4th 23 10:27 AM
IF statement in macro Aline Excel Worksheet Functions 4 September 30th 08 07:40 PM
If statement in macro orquidea Excel Discussion (Misc queries) 2 May 11th 08 08:19 PM
If statement in a Macro Dave Excel Discussion (Misc queries) 1 January 29th 05 12:17 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


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

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

About Us

"It's about Microsoft Excel"