Tricky IF statement re-write

lostdogpr

New Member
Joined
Oct 30, 2014
Messages
1
Hi All,

I'm new to this forum and hope someone can shed some light on a statement. The problem that I have is I'm currently running an IF statement with a vlookup which is matching a text field with a date to return some date from a column on a different sheet. The issue is there are times where the look up "D8" can have multiple text fields as they are stacked to create a string.

=IF(ISERROR(VLOOKUP($D8&K$5,NewCalc!$B$3:$W$3000,3,FALSE)),"",VLOOKUP($D8&K$5,NewCalc!$B$3:$W$3000,3,FALSE))

=IF(ISERROR(VLOOKUP($D22&K$5,NewCalc!$B$3:$W$3000,3,FALSE)),"",VLOOKUP($D22&K$5,NewCalc!$B$3:$W$3000,3,FALSE))

Details:


  • D8 is a name and K5 is the date which drives the vlookup on the sheet "NewCalc"
    • Column B3 on the "NewCalc" sheet has this formula (=I3&J3) "I" being a resource and "J" being the date in numbers
    • Problem: in column B... I get nested information.... D8D22... example: John41941... or JohnPaul41941
    • The above statement will only find "John41941"... and then return the date in column "3"
  • I need this statement to return the date in column "3" by searching for the "Text" and then "Date" and then return date from column "3"

Is this possible, as I have now written this statement over 3 times and still it does not work the way I want.

The next issue I have is there could be multiple "John" in the same date field... Is there a way to return the first set and then the second set of information?

I'm happy to provide a working example of my report with some sample date.

Thanks in advance...
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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