Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Select Case Help

Posted on 2014-01-21
3
Medium Priority
?
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 39798860
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
ID: 39798946
Thank You
0
 
LVL 49

Expert Comment

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

Marty - MVP 2009 to 2013
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
New style of hardware planning for Microsoft Exchange server.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

670 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