Solved

Select Case Help

Posted on 2014-01-21
3
234 Views
Last Modified: 2014-01-21
I have the code below ,but the data has changed so I need to look for "CLEAR" in that cell that will have other data now.  For example  K5 would read "Light Intensity CLEAR"  how do i adjust to look for CLEAR with other data now in the cell. Thanks
Set ws = Sheets("Sheet19")
Set ws_pic = Sheets("Pic")
   
Set cel = ws.Range("k5")
Select Case cel
Case "CLEAR"
    Set Shp = ws_pic.Shapes("Picture 30")
Case "FEW CLOUDS"
    Set Shp = ws_pic.Shapes("Picture 32")
Case "PARTLY CLOUDY"
    Set Shp = ws_pic.Shapes("Picture 28")
0
Comment
Question by:sandramac
  • 2
3 Comments
 
LVL 45

Accepted Solution

by:
Martin Liss earned 500 total points
Comment Utility
Set cel = ws.Range("k5")
Select Case True
Case instr(1,cel,"CLEAR") > 0
    Set Shp = ws_pic.Shapes("Picture 30")
Case instr(1,cel,"FEW CLOUDS") > 0
    Set Shp = ws_pic.Shapes("Picture 32")
Case instr(1,cel,"PARTLY CLOUDY") > 0
    Set Shp = ws_pic.Shapes("Picture 28")

Open in new window

0
 

Author Closing Comment

by:sandramac
Comment Utility
Thank You
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now