+ Reply to Thread
Results 1 to 5 of 5

If or Case?

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    22

    If or Case?

    I need a macro code for this please.

    Here’s the scenario. Column A cells has 4 default entries AA, BB,CC,DD which I made it as a dropdown list. By default these 4 entries represents corresponding numbers AA=1, BB=2, CC=3, DD=4. What I need is once I click certain cell for example A3 and select BB, B3’s value should be “2”. What is the best statement? If or case. Post code please.

    Thanks in advance,

    Jayce

  2. #2
    Forum Contributor
    Join Date
    12-14-2013
    Location
    Tilburg, Nederland
    MS-Off Ver
    Excel 2010
    Posts
    256

    Re: If or Case?

    Put this in the macro page of the worksheet:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If or Case?

    Ahoy! Thanks Gerard. It works like a charm!

  4. #4
    Registered User
    Join Date
    01-02-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: If or Case?

    How about if AA: 5, BB: 8, CC: 30, DD: 30?

    Thank you!

  5. #5
    Forum Contributor
    Join Date
    12-14-2013
    Location
    Tilburg, Nederland
    MS-Off Ver
    Excel 2010
    Posts
    256

    Re: If or Case?

    If you want to use IF:
    Please Login or Register  to view this content.
    In case you want to use Case:
    Please Login or Register  to view this content.
    Last edited by G e r a r d; 02-20-2014 at 03:51 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Write a subroutine in a module to change case upon exit of a cell to upper case
    By Stephd22 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2013, 06:39 PM
  2. Delete duplicates with lower case and upper case taken into account?
    By Tinwelende in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-17-2013, 11:35 AM
  3. [SOLVED] Convert 1st letter of word to Upper Case and rest to lower case
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-23-2013, 11:44 AM
  4. How to change mixed case to upper case in Excel for all cells
    By WordAlone Network in forum Excel General
    Replies: 6
    Last Post: 02-14-2006, 08:10 PM
  5. Replies: 2
    Last Post: 12-09-2005, 05:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1