View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Hlookup, Vlookup and IF in combination??

=INDEX(D1:BD1,MIN(IF(D2:BD2<"",COLUMN(D2:BD2)-COLUMN(D2)+1)))

which is an array formula, so commit with Ctrl-Shift-Enter

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"ronnomad" wrote in message
...
I have data that is about 2000 rows and 55 columns. 52 of the columms are
headed with a week starting date. The other columns have product names,
number and number of times ordered (this number is attained by counting
the
times a quantity appears in a dated column). The 52 dated columns have
the
quantity ordered but each items is not ordered every week. What I would
like
to do is:

For the items that have been ordered only once, find the date in the
heading
and place that date in a column beside the product name.

Is there a way to write a formula (or macro) that would basically say,
"if
the quantity in columm C (the number of times ordered) is equal to 1, look
across the dated columns until a value greater than zero is found and then
copy the date at the head of that column into the cell where the formula
is".

Thanks & Happy New Year

Ron R