LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Changing the background color of a cell

Hi

I'm comparing two lists and if a contract number equals that on another list
I want to highlight the line in the original list. I have looked for ages on
the web but everywhere that uses the range command seems to assume you know
the row but I'm trying to use two variables as below.

If Trim(Worksheets("Cappuchino Data").Cells(iCappuchinoRow,
7).Value) = Trim(Worksheets("Subs Safety Net").Cells(iSubsSafetyRow,
3).Value) Then

Worksheets("Cappuchino Data").Range(Cells(iCappuchinoRow, 1),
Cells(iCappuchinoRow, 31)).Interior.Color = 1
GoTo NextCappLine

End If

However, this just throws up an error.

Can you please help?

Many Thanks

Steve
 
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
changing cell background color okelbes Excel Worksheet Functions 1 September 20th 06 03:28 PM
Changing background color based on different cell djarcadian Excel Discussion (Misc queries) 3 August 10th 06 10:44 PM
Macro for Changing Cell Background Color [email protected] Excel Programming 7 December 2nd 05 05:39 PM
automatically changing the background color of a cell martin Excel Programming 8 January 6th 05 11:00 AM
Changing the Cell Background Color when a keyword is entered Rachael[_2_] Excel Programming 7 February 24th 04 04:16 PM


All times are GMT +1. The time now is 03:02 AM.

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"