+ Reply to Thread
Results 1 to 4 of 4

If formula for range of cells

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    Bozeman, MT
    MS-Off Ver
    Excel 2010
    Posts
    10

    If formula for range of cells

    I have two tabs of a worksheet. I want to see if the number I have in B2 matches any of the numbers on the second tab in the range B2:B10. If the one number in B2 does match any of the numbers in B2:B10, I want the cell to populate with a corresponding value in C2:C10. So, I have ID numbers for cases listed on the first tab in column B. I have those same type of numbers for cases listed on the second tab in column B of the second tab. In column C on the second tab, I have dates. If the case ID on the first tab matches any of the case IDs on the second tab, I want the corresponding (so same row as the matching ID) date in the column next to it. If there is no match for the case ID on the first tab, it should populate the cell with "no". Any suggestions?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: If formula for range of cells

    Put this in C2 of the first sheet:

    =IFERROR(VLOOKUP(B2,Sheet2!$B$2:$C$10,2,0),"no")

    Format the cell as Date in the style you prefer. You can copy the formula down if you have other IDs in column B.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    Bozeman, MT
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: If formula for range of cells

    Awesome! That worked! Thanks so much for your help!

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

    Re: If formula for range of cells

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    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)

Similar Threads

  1. Replies: 1
    Last Post: 09-04-2013, 07:23 AM
  2. [SOLVED] Formula Needed to count a range of cells based on criteria in 2 other cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2013, 04:06 PM
  3. Replies: 1
    Last Post: 01-23-2013, 03:00 PM
  4. [SOLVED] VBA Copy a range of cells values using the range of cells in a formula (which will change)
    By murtaep in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 06-05-2012, 07:59 AM
  5. Replies: 2
    Last Post: 05-31-2012, 05:37 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