Vlookup ignore blanks - API

DJT

New Member
Joined
Sep 27, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,


I have been struggling for a few days with this. I am actually using google sheets, but it is the basic vlookup functionality I am hoping to get help with.


An API delivers data to tabs “DT Export staff by title” and “DT Holiday Export”. I use queries to import the required data into tabs “Avonmouth Hols” and “Avonmouth Staff”.


Holidays are delivered row by row and a start and end date are given. I want to consolidate this information into a calendar view, that shows all holidays per person booked. Tab “Avonmouth Staff” shows this attempt.


This is simply the latest of many attempts hence why it looks slightly long winded. The problem is that when the vlookup searches for the employee id – it will find many entries, but not always will there be a holiday for that date. Therefore this formula misses most holidays. And so I need the vlookup to be able to skip blank cells.


My best attempt was:-

=VLOOKUP($A2,SORT('Copy of Create Hol Cal'!$A$1:$CW,MATCH(H$1,'Copy of Create Hol Cal'!$A$1:$CW$1,0),FALSE),MATCH(H$1,'Copy of Create Hol Cal'!$A$1:$CW$1,0),FALSE)

This formula is a copy from another google sheet – and here I am using a match to tell the vlookup which column to return and I am using sort to put the “1” to the top so that the vlookup always find the highest value.

The problem with this is that it crashes the sheet – there are too many calculations.


Can anyone tell me a neater way for the vlookup to ignore blank cells, in a dynamic search such as I require?


Let me know if I have no explained things clearly


Thank you in advance for any assistance you can provide
 

Attachments

  • Mr Excel 2.png
    Mr Excel 2.png
    184.3 KB · Views: 30
  • MrExcel 1.png
    MrExcel 1.png
    218 KB · Views: 30

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
If you still need help then shout. You wouldnt use vlookup for this.
 
Upvote 0
Id love to hear your suggestion.

I have got a working model now, I used [Filter] in the end which appears to have worked, but I need to test the data thoroughly
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top