LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Case Select

HI Bob
After a good nights sleep and reading your post and studying this worksheet
further this is what I have determined I need to change:
the first criteria is whether F2:IV2 is numeric or not. IF numeric the case
select should be based on F3:IV3. If F2:IV2="CAR" then the case select
should be based on F4:IV4. The ColorCell function then colors Row2:17 based
on the case select. So, if f2=1 and F3=Cat then F2:F17 cell color is 39 and
if g2=Car and F4 =dog, then F2:F17 cell color is 40.
This is slightly different from the original posting but I think i more
clearly illustrates what I am trying to accomplish
Thanks for your help!
K


"Bob Phillips" wrote:

So do you want it to use the alternate range if there is (at least) one
instance of CAR, or every cell is CAR?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kelly" wrote in message
...
Yes,The value in F1:IV1 will either be "CAR" or a numeric value.
Thanks for your help!
kelly


"Bob Phillips" wrote:

"Kelly" wrote in message
...
Hello
I am trying to modify existing code

On Error GoTo ws_exit:
Application.EnableEvents = False
For Each cell In Me.Range("F2:IV2")
Select Case UCase(cell.Value)
Case "Cat": ColorCell UCase(cell.Value), cell, 39
Case "Dog": ColorCell UCase(cell.Value), cell, 40
Case "Fish": ColorCell UCase(cell.Value), cell, 35
Case "Horse": ColorCell UCase(cell.Value), cell, 36
End Select
Next
WS_exit

The cases will be the same Cat,Dog,Fish,Horse.
However
if F1:IV1 = "CAR" me.range is F2:IV2 and
if F1:IV1= Numeric then me.range is F3:IV3

I am not sure what that means. Does F1:IV1 ="CAR" mean that every cell

is
that value?






 
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
select case Hein Excel Discussion (Misc queries) 5 November 24th 09 01:19 PM
Select case Hein Excel Discussion (Misc queries) 2 October 22nd 08 07:06 AM
Case Select NoodNutt Excel Worksheet Functions 7 September 21st 08 02:10 AM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Need help on Select Case Susan Hayes Excel Worksheet Functions 1 November 3rd 04 10:25 PM


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