+ Reply to Thread
Results 1 to 2 of 2

Select worksheet based on condition & populate cell based on condition

  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    St. Louis, Missouri
    MS-Off Ver
    Excel 2003
    Posts
    1

    Select worksheet based on condition & populate cell based on condition

    We have the following worksheets with corresponding tables:

    -------------------------------------------
    WorksheetName1 = TennisBalls

    Table in this worksheet

    Ball_Color Selection
    ======= =======
    Cell A B

    1 blue -
    2 red -
    3 green -

    -----------------------------------------------

    WorkSheetName2 = BasketBalls

    Table in this worksheet

    Ball_Color Selection
    ======= =======
    Cell A B

    1 blue -
    2 red -
    3 green -

    ----------------------------------------------------

    WorkSheetName3 = SoccerBalls

    Table in this worksheet

    Ball_Color Selection
    ======= =======
    Cell A B

    1 blue -
    2 red -
    3 green -
    -------------------------------------------------------

    WorkSheetName0 = Main

    if( (condition1 == SoccerBalls) && (condition2 = = red)

    then
    SoccerBalls!B2 = Yes

    --------------------------------------------------------

    I am checking for conditions in the Main worksheet. Based on the Then clause, I want to jump to the corresponding worksheet and populate the corresponding cell.

    (1) How do I set up the Then clause in excel?

    (2) Is it possible to set up the Then clause where it is table-driven? In reality, I will have:
    10 worksheets x 30 colors = 300 combinations

    Thank you for your expertise and time!
    Last edited by beth1069; 11-10-2011 at 10:38 AM. Reason: Correction of cell number

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Select worksheet based on condition & populate cell based on condition

    Are the cells color coded or are the colors typed in?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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