+ Reply to Thread
Results 1 to 11 of 11

lookup across sheets

Hybrid View

  1. #1
    Registered User
    Join Date
    10-12-2007
    Posts
    36

    lookup across sheets

    Hi Guys,

    Just to start by thanking this forum for the help.

    Just wanted to ask how I find the adjacent value. I have this formula, but when I add another IF condition, its not accepted. (maybe the formula is too long for excel?).

    =IF((K29=Jan!$B$34),Jan!$D$34,IF((K29=Feb!$B$31),Feb!$D$31,IF((K29=Mar!$B$33),Mar!$D$33,IF((K29=April!$B$32),April!$D$32,IF((K29=May!$B$34),May!$D$34,IF((K29=June!$B$32),June!$D$32,IF((K29=July!$B$33),July!$D$33,IF((K29=August!$B$34),August!$D$34,""))))))))

    What this does is its comparing K29 with values on other tabs, and then if it matches, its populating the cell with the date adjacent to value on the tab.

    So for example its saying if K29 = May.B34, then put in May.D34 - which is a date.

    Thank you in advance
    DrChris

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi DrChris,

    You seem to have to many parenthesis (), but it seems to work OK for me?
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    08-24-2007
    Posts
    35
    i thought you could only nest upto 7 if's?????

  4. #4
    Registered User
    Join Date
    10-12-2007
    Posts
    36
    Hi Chippy

    Cheers for the reply

    Indeed it does, but adding another IF condition (for september for example), doesnt seem to work!

    =IF(K29=Jan!$B$34,Jan!$D$34,IF(K29=Feb!$B$31,Feb!$D$31,IF(K29=Mar!$B$33,Mar!$D$33,IF(K29=April!$B$32,April!$D$32,IF(K29=May!$B$34,May!$D$34,IF(K29=June!$B$32,June!$D$32,IF(K29=July!$B$33,July!$D$33,IF(K29=August!$B$34,August!$D$34,IF(K29=Sept!$B$31,Sept!$D$31,"")))))))))

    Any ideas?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-12-2007
    Posts
    36
    JustinBram: Looks like its 8

    Thing is, I need to do that for every month: i.e 12 IFs!

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    OK, another approach is a VLOOKUP may be?
    Attached Files Attached Files

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Some links re if statements

    However if you need more than 7 if's you might be better off setting up a table and doing a vlookup

    http://www.usd.edu/trio/tut/excel/adv/26if.html

    http://www.cpearson.com/excel/nested.htm

    http://www.j-walk.com/ss/excel/usertips/tip080.htm

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe a macro might be better.

    See attached example. Code from this link

    http://www.ozgrid.com/VBA/VlookupAllSheets.htm

    VBA Noob
    Attached Files Attached Files

+ 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