+ Reply to Thread
Results 1 to 10 of 10

Need help with VLookup then bring back value based on several IF statements

  1. #1
    Registered User
    Join Date
    04-24-2014
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    20

    Need help with VLookup then bring back value based on several IF statements

    I have a worksheet with equipment numbers that I'll vlookup against a table. The table has the same equipment number several times in column A. However, based on what is in column B, I will bring back a value from column C.

    I need to lookup equipment # from my spreadsheet to the table.

    IF "FLOAT VOLTAGE" return value from column C in the table to column C2 in spreadsheet. Then return Date value from Column F in table, to Column D2 in Spreadsheet and value in Column G in table to column E2 in spreadsheet.
    IF "UNINTENTIONAL GROUNDS" return value from column E in the table to column C3 in spreadsheet. Then return Date value from Column F in table, to Column D3 in Spreadsheet and value in Column G in table to column E3 in spreadsheet.
    IF "WATER LEVEL OK" return value from column E in the table to column C4 in spreadsheet. Then return Date value from Column F in table, to Column D4 in Spreadsheet and value in Column G in table to column E4 in spreadsheet.

    MOD EDIT Original text of this post (since edited out by OP):

    I need to lookup equipment # from my spreadsheet to the table. Then if it is "PINTS OF WATER ADDED" I need to bring back the value of 4.00.


    EXAMPLE: Spreadsheet that has equipment #'s

    Location Equipment #
    Area 1 2000773900
    Area 2 2000767263
    Area 3 2000773898
    Area 4 2000839992
    Area 5 2000839988



    I need to lookup equipment # from my spreadsheet to the table.

    2000773900 FLOAT VOLTAGE 134.50
    2000773900 PINTS OF WATER ADDED 4.00
    2000773898 FLOAT VOLTAGE 134.10
    2000773898 FLOAT AMPS 4.20
    Attached Files Attached Files
    Last edited by AliGW; 07-18-2018 at 03:34 AM. Reason: Redacted text reposted.

  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,933

    Re: vlookup with multiple if statements - HELP

    Maybe something like this?

    =vlookup($B2,sheet2!$A$1:$c$100,if(vlookup($B2,sheet2!$A$1:$c$100,2,0)="Pints of water added",3,"whatever-else-you-need-here"),0)
    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
    04-24-2014
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: vlookup with multiple if statements - HELP

    I'm getting a #VALUE! returned with this formula. Any ideas what I can do?

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Need help with VLookup then bring back value based on several IF statements

    Try the following array entered formula* for column C:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Try the following array entered formula* for columns D and E:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Need help with VLookup then bring back value based on several IF statements

    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  6. #6
    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,933

    Re: Need help with VLookup then bring back value based on several IF statements

    Did you change the sheet names in your file, and then reload it (in post 1)? My formula references sheet2, but that no longer exists (Table sheet now?)
    Last edited by FDibbins; 07-17-2018 at 11:26 PM.

  7. #7
    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,933

    Re: Need help with VLookup then bring back value based on several IF statements

    also looks like you changed the text in post 1, too? My formula contained a test for "Pints of Water Added", no way would I have just added that, unless it was a requirement.

    If you need to change/adjust the requirements, please do so in another post, dont change what you have already posted.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Need help with VLookup then bring back value based on several IF statements

    As Ford says, post-editing your posts is very unhelpful, and it means that what follows apppears to make no sense. I have, therefore, put back the text that you had edited out of your first post so that everybody can see and understand the flow of the thread.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    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,933

    Re: Need help with VLookup then bring back value based on several IF statements

    Ali, thanks for that. Where did you find the original post? (I had started to think I was seeing things lol)

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Need help with VLookup then bring back value based on several IF statements

    I'll PM you to explain.

+ 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. Vlookup with multiple IF statements
    By andrea5676 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2016, 04:23 PM
  2. Multiple IF statements with VLOOKUP
    By Barry L in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 11-11-2015, 09:21 PM
  3. [SOLVED] Problems connecting multiple If and VLOOKUP statements
    By thomas.lyons in forum Excel General
    Replies: 11
    Last Post: 12-30-2014, 02:02 PM
  4. Replies: 3
    Last Post: 07-25-2013, 08:25 AM
  5. Replies: 7
    Last Post: 11-13-2012, 11:46 AM
  6. Using vlookup and if/then statements for multiple tables
    By HP RodNuclear in forum Excel General
    Replies: 9
    Last Post: 04-06-2011, 05:15 PM
  7. [SOLVED] if statements depending on multiple VLOOKUP functions
    By njuneardave in forum Excel General
    Replies: 1
    Last Post: 06-21-2006, 11:40 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