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: 83
Default Loop to change cell color based on found value?

Hello there,
I'm trying to find a value in column "B16","B46" and based on that value set
the upper limits to the cells in that row starting at column E to the end
(last column)

I need to match certain conditions after finding the desired value. The
Colored cells begin on column E, the same for the values to be checked and
colored orange
I've been trying to use ActiveCell.Offset but I can only go through rows or
through columns, not both.

i.e.
If "P" And Cell.Interior.ColorIndex = 6 And Cell.value 5000
ActiveCell.Interior.ColorIndex = 44

If "Na" or "Mg" or "K" And Cell.Interior.ColorIndex = 6 And Cell.value 5500
ActiveCell.Interior.ColorIndex = 44

If (Rest of cells) And Cell.Interior.ColorIndex = 6 And Cell.value 500
ActiveCell.Interior.ColorIndex = 44

Any help will be more than appreciated. Right now I'm "looping" and
confusing myself with the best approach
--
Gaba
 
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
Change tab color based on current color of a cell MarkT Excel Discussion (Misc queries) 0 May 22nd 08 05:46 PM
Can a cell change color based on the value of another? Woodenkettle Excel Discussion (Misc queries) 2 June 7th 07 10:15 PM
Can you change the color of one cell based on the color of another andoscott Excel Discussion (Misc queries) 4 May 4th 07 04:02 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
Change tab color based on a cell value Zenaida Excel Discussion (Misc queries) 14 April 27th 06 10:35 PM


All times are GMT +1. The time now is 03:08 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"