Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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!

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
Adding a loop to conditional delete code maw via OfficeKB.com New Users to Excel 21 August 15th 06 04:11 PM
Conditional format cell ranges with loop? welded Excel Programming 7 June 19th 04 07:54 AM
Conditional alternating loop W.J.Surrarrer Excel Programming 0 June 3rd 04 01:29 AM
Loop for changing cell formatting Matt Excel Programming 1 January 15th 04 03:47 PM
Conditional Lookup and copy loop between worksheets David S[_3_] Excel Programming 1 September 30th 03 02:10 AM


All times are GMT +1. The time now is 12:35 AM.

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"