+ Reply to Thread
Results 1 to 6 of 6

Multiple Worksheets ranges with IF, Then Else

  1. #1
    Registered User
    Join Date
    02-16-2009
    Location
    Southern, California
    MS-Off Ver
    Excel 2013
    Posts
    5

    Multiple Worksheets ranges with IF, Then Else

    I have multiple worksheets and I am trying to put text on in cells on these worksheets to indicate which region has Q1 thru Q4 checked on the main worksheet.

    The main worksheet has column for names, and months displayed as:
    ========================================
    REGION1
    ========================================

    Column A B C D E F G H I J K L M
    row1: Name Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
    row2: Integration X
    row3: Critical x
    row4: Notes7

    Note: Each 3 months is a quarter or Q1, Q2, Q3, Q4.

    Another sheet named "Checklist" has a cell that I want to put a value in based on if there is a "x" in the ranges of months. The Checklist has a row#22 that looks like this:

    Column: C D E
    Region1 Region2 Region3 etc.....
    Row22: Q1 2015 blank Q3 2015

    Note: Each Name column above is also the name of the worksheet. For instance, "Integration" is also the name of a worksheet.... Note7 is the name of a worksheet. I need to match the Name column with the worksheet name and then determine if the "x" falls in Q1, Q2, Q3, Q4 or if not any then place a blank in the cell in "Checklist" worksheet.

    Here's my code:
    Please Login or Register  to view this content.
    Note: I'm trying to check each set of ranges Q1 thru Q4 for each worksheet.Name or tab that matches the "Name" column in the Main worksheet. Then if there is an "x" in for instance Feb then put "Q1 2015" in CO cell in the Checklist worksheet. If for instance there is no "x" in Jan, Feb, Mar, then blank would go in CO cell in the Checklist worksheet.

    I tried using a VLookup on the Checklist cell "C22" but it became too complicated to do what I needed. I also tried to do just a =If then else function in the CO cell "C22" but proved too difficult as well.

    So, far I have been able to get it to put "Q1 2015" in the first worksheet, but then all the sheets have the same value, which is wrong because Notes 7 should be blank in cell C22.

    Can someone help me with this, please. If I can get some help with region1, then I can copy the process for the other regions.

    Thanks!
    Gina
    Last edited by FDibbins; 05-22-2015 at 07:21 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Multiple Worksheets ranges with IF, Then Else

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I have added the code tags for you - this time
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-16-2009
    Location
    Southern, California
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Multiple Worksheets ranges with IF, Then Else

    Thank you. Does any one have a solution?

    Gina

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: Multiple Worksheets ranges with IF, Then Else

    Can you upload the file ? (after you delete sensible/confidential data)
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  5. #5
    Registered User
    Join Date
    02-16-2009
    Location
    Southern, California
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Multiple Worksheets ranges with IF, Then Else

    Hi, there is no file at this time. I'm just trying to code the concept.

    The row looks like this:
    Name Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
    Critical
    Integration

    What I'm trying to do is have the code:

    1. go down the "Name" column
    2. for each "Name" on the same row are columns Jan, Feb, Mar.
    3. If there is an "X" in columns Jan, Feb, or Mar then put the text "Q1 2015" in a cell on a different worksheet, else put "" in the cell on the different worksheet.

    Basically that's it. If someone can get me this far, I think I can determine the rest.

    Additionally, it would go on to search Apr, May, June on the same row. If there is an "x" in Apr, May, or June then put "Q2 2015" in the cell on another worksheet.

    Thanks in advance for your help.
    Gina

  6. #6
    Registered User
    Join Date
    02-16-2009
    Location
    Southern, California
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Multiple Worksheets ranges with IF, Then Else

    I found a solution in the nested if function: =IF(ISTEXT(Main!B2),"Q1 2015")

    I placed this in the sheet cell that returns the text "C22". The If statement was long to check for each cell in January thru December, but it works. I just changed the text to "Q2 2015" when testing for those months.

    There is so much that I still need to learn about Excel.

    Thanks,
    Gina

+ 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. Sum same ranges of multiple worksheets IF...
    By dej222 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-27-2009, 04:20 PM
  2. Replies: 2
    Last Post: 10-14-2007, 01:05 PM
  3. Replies: 0
    Last Post: 07-06-2006, 12:00 AM
  4. how to merge ranges from multiple worksheets
    By crowleydl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-05-2005, 02:24 PM
  5. [SOLVED] copy ranges from multiple worksheets
    By simora in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2005, 09:06 PM

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