1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel code - If Range("F1") - "WW?????" then

Discussion in 'Business Applications' started by PincivMa, Jul 20, 2015.

Thread Status:
Not open for further replies.
Advertisement
  1. PincivMa

    PincivMa Thread Starter

    Joined:
    Mar 13, 2004
    Messages:
    378
    Hi there

    This should be easy for you excel experts to figure out. I'm stuck on only one line of code in Excel. The line is in bold.

    If Range("F1").formulaR1C1 = "WW????" then
    Application.Run "Macro1"
    Else
    Application.Run "Macro2"

    What I want to do is this. If the user puts in WW1234 or WW6598 or any other text or number after the WW in Cell F1 then execute Macro 1 else execute macro 2.

    Please help
     
  2. DaveBurnett

    DaveBurnett Account Closed

    Joined:
    Nov 11, 2002
    Messages:
    12,970
  3. PincivMa

    PincivMa Thread Starter

    Joined:
    Mar 13, 2004
    Messages:
    378
    Hi Dave

    Thanks for the link. I used the IsNumber(search("text", G1) and it worked great.
     
  4. DaveBurnett

    DaveBurnett Account Closed

    Joined:
    Nov 11, 2002
    Messages:
    12,970
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1151983

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice