conditional formatting & a loop
Hi!!
I'm trying to change the colour of an entire row if the value in F26 < value in D26 (d contains a value & f contains a formula). I figured out how to change the colour of one cell but cannot do the entire row. Also, I need to repeat this down to the bottom of my worksheet which can be a different length each month when I run the reconciliation. I couldn't get the loop to work for pasting the formula into F - so I've typed it into F26 and pasted to F10000 (hoping I never have that many rows). PLEASE HELP!!! thanks! |
conditional formatting & a loop
Use conditional formatting to get the desired result. If you want to
do this through code, turn on the macro recorder (Tools | Macro Record new macro...), do the below, and turn off the recorder. Select row 26. Select Format | Conditional Formatting... In the left-hand drop-down list select 'Formula Is' On the right text box enter =$F26<$D26. Click the Format...button and format as desired. Turn off the recorder here. Now, use the ideas behind Beyond the macro recorder http://www.tushar- mehta.com/excel/vba/beyond_the_macro_recorder/index.htm to generalize your code. If you need additional help, please post your code in the text of a message and someone should be able to help you generalize it. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... Hi!! I'm trying to change the colour of an entire row if the value in F26 < value in D26 (d contains a value & f contains a formula). I figured out how to change the colour of one cell but cannot do the entire row. Also, I need to repeat this down to the bottom of my worksheet which can be a different length each month when I run the reconciliation. I couldn't get the loop to work for pasting the formula into F - so I've typed it into F26 and pasted to F10000 (hoping I never have that many rows). PLEASE HELP!!! thanks! |
All times are GMT +1. The time now is 02:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com