VLOOKUP against a date range and document name based on name and publication date of a book to return the version number of the book

ayeready

New Member
Joined
Oct 26, 2018
Messages
18
Hi all.

I'm having a problem trying to code this correctly and i'm looking for some assistance. I'm looking for a user to input a book title along with a date, in order to automatically show the correct version they should be using. For example:

Search CriteriaBookDate
User InputBook101/07/2018

<tbody>
</tbody>
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">

</code>This should then return a value of Book1 V2 based on the table below:

BookStart DateEnd Date
Book1 V101/08/201631/07/2017
Book1 V201/08/201731/07/2018
Book1 V301/08/201831/07/2019
Book2 V101/08/201631/07/2017
Book2 V201/08/201731/07/2018

<tbody>
</tbody>

<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">
</code>I've searched for the past 2 weeks and just cannot find the correct formula to get this to work properly.
One of the pitfalls of google learning rather than properly learning excel i'm afraid.
:(

Any help would be greatly appreciated as i'm banging my head against a brick wall just now.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I'd probably 'cheat'.

Name your search fields as S_BOOK & S_DATE, then in a column next to the table enter this formula and copy down :

=IF(AND(LEFT(A2,LEN(S_BOOK))=S_BOOK,B2<=S_DATE,C2>=S_DATE),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

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