+ Reply to Thread
Results 1 to 20 of 20

how to get VLookup to pick the second row when the first row is blank

  1. #1
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Angry how to get VLookup to pick the second row when the first row is blank

    I'm trying to get VLookup to pick the second row when the first row is blank. it's for time sheet purposes

    example




    i have tired VLookup, index match, xlookup. if someone could please help me solve this it would be greatly appreciated
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by ESIERRA44; 04-17-2021 at 01:19 PM.

  2. #2
    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,821

    Re: VLookup to pick the second row when the first row is blank

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I have done it for you today.)
    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.

  3. #3
    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,821

    Re: VLookup to pick the second row when the first row is blank

    Please update your forum profile with the current version you are using - 2019 or 365. Thanks.

    There are instructions at the top of the page explaining how to attach your sample workbook.

  4. #4
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: VLookup to pick the second row when the first row is blank

    this has been done

  5. #5
    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,821

    Re: how to get VLookup to pick the second row when the first row is blank

    I don't see a VLOOKUP anywhere!

    You did not need to change the title again - as I said above, I had already done it for you.

    Please update your forum profile with the current version you are using - 2019 or 365. Thanks.

  6. #6
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    I uploaded the doc. I'm trying to pull the daily start and stop times from the weekly schedule data tab to the schedule tab. if you notice Karon Adams has signed up for Monday, Tuesday, and weds. but it will only pull Monday. I need it to pull the next line where she signed up for Tuesday

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

    Re: how to get VLookup to pick the second row when the first row is blank

    Please update your forum profile with the current version you are using - 2019 or 365. Thanks.

  8. #8
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    this has now been done

  9. #9
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: how to get VLookup to pick the second row when the first row is blank

    Why does Karon Adams have a separate row for each day but Kristin Adamson have only 1 row for each day.

  10. #10
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: how to get VLookup to pick the second row when the first row is blank

    Try this in cell E4 and copy down and across to the Start/Stop columns:

    =SUMPRODUCT(('Weekly Schedule Data'!$C$2:$C$5=$A4)*(INDEX('Weekly Schedule Data'!$D$2:$Q$5,,MATCH(E$3,'Weekly Schedule Data'!$D$1:$Q$1,0))))

  11. #11
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    so how this works agents signs up for shifts on google docs. when they sign up it auto populates on to this sheet. so every time the sign up for a new shift it populates on another row. thats why i need it to ignore a field if its blank and go to the next one

  12. #12
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    nope didnt work

  13. #13
    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,821

    Re: how to get VLookup to pick the second row when the first row is blank

    That's a useless response, sorry. Explain in what way it didn't work:

    Did it produce an error? If so, what error?
    Did it produce the wrong results? If so, in what way?

    Attach a sample workbook showing your attempt at using the formula.

    Are you actually using GoogleSheets for this, or Excel?

  14. #14
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    you sound like you know what you are doing. i can email the doc and you email it back if it helps. im new to this forum so im not sure if you can download and edit the doc i posted

  15. #15
    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,821

    Re: how to get VLookup to pick the second row when the first row is blank

    No, sorry - we don't take things away from the forum. I will not be sharing my E-mail address with you or anyone else.

    First, answer ALL three questions in my previous post, none of which you have addressed in your latest response.

    Help us to help you!

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: how to get VLookup to pick the second row when the first row is blank

    The formula in Post #10 from Gregb11 does work.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    Hey, thanks for all of your help. It does work. the next issue now is when i copy the formula into other fields it fills with 12:00:00 AM. it needs to remain blank if no results are found.

  18. #18
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: how to get VLookup to pick the second row when the first row is blank

    It really depends on formatting. I took the file you initially uploaded and updated it with my formula in rows 8 and 9. You'll notice the cells are blank if no time is entered.
    One caveat - will anybody actually had a start/end time of 12:00:00 AM? If so, it will not show up because I believe it's the same as 0.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    awesome thanks this now works well. now for some reason when i upload it to google docs the schedule will no longer update the array formula from the weekly schedule data sheet

  20. #20
    Registered User
    Join Date
    04-17-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    11

    Re: how to get VLookup to pick the second row when the first row is blank

    actually nevermind i figured it out. thanks everyone for all of your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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