View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
zvkmpw zvkmpw is offline
external usenet poster
 
Posts: 153
Default Newbie needing help with nested VLOOKUP IF function....

On Jan 24, 1:50*am, Draven wrote:
Hi, folks.

I'm looking for a bit of help with this one, as it's got me completely
stumped. *I've got a large table of data, and I'm using a VLOOKUP
function to retrieve delivery dates for items, but I have two columns
for delivery dates - one entitled Delivery Date, and one New Delivery
Date. *As much as I'd like to be able to change this, the system has
been in place so long now that it'd be a complete uphill struggle.

What I've been doing is trying to use an IF command to say, "if the date
retrieved from the VLOOKUP function is missing from the 'New Delivery
Date' column, take the one from the 'Delivery Date' column." *The
formula ended up looking a little like:

=VLOOKUP(A2,B3:K8,IF(?2=\"\",?1,?2),FALSE)

(?1 being the data from the 'Delivery Date' column, ?2 the 'New Delivery
Date' column, and the "" being used to designate that the entry is
blank.)

The trouble is, I can't work out how to get Excel to look at the column
values in the relevant columns for each instance of the VLOOKUP
function.

Can anyone help? *This is probably quite elementary to most of you
folks, so please do excuse me if that's the case, I'm quite new to all
this!

Thanks!

--
Draven


The following isn't elegant, but it seems to work:
=IF(VLOOKUP(A2,B3:K8,4,FALSE)="",
VLOOKUP(A2,B3:K8,5,FALSE),
VLOOKUP(A2,B3:K8,4,FALSE))
In my example, the column offsets 4 and 5 are for "new delivery date"
and "delivery date" respectively.

Modify as needed.