View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary F Shelton Gary F Shelton is offline
external usenet poster
 
Posts: 6
Default clarification on VLOOKUP

Here is another fun little formula that might be easier than a vlookup.... I
will

=INDEX(Result Array,MATCH(Record,Record Array,0))

SAMPLE DATA:
A B C G
H
???COGS???
1 SKUCD SKU NM (Insert Formula) SKUCD COGS
2 GFS123456 Onions BK123
$14.50
3 BK123 Pepers ABC987
$13.25
4 ABC987 Cheese GFS123456
$12.75

Cell C2 type the following formula: =INDEX(H:H,MATCH(A2,G:G,0))
Cell C3 type the following formula: =INDEX(H:H,MATCH(A3,G:G,0))
Cell C4 type the following formula: =INDEX(H:H,MATCH(A4,G:G,0))

Hope this helps...

--
GS


"Dave Peterson" wrote:

If your table is wide enough (13 columns--one for the key and 12 for each
month???), then you may want:

month(today())+1
to avoid bringing back column 1 of the table array.

But that doesn't explain the error.

If the error you're seeing is #n/a, maybe you don't have a match for that
lookup_value in the leftmost column of the table array.

Debra Dalgleish has lots of notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://contextures.com/xlFunctions02.html#Trouble

Hamsa wrote:

VLOOKUP(lookup_value,table_array,col_index_num,ran ge_lookup)

If I use MONTH(TODAY()) in place of col_index_num, I am getting an error.

I have also tried TODAY() in cell A1, MONTH(A1) in cell B1 and
B1 in place of col_index_num. I still get an error.

Is it allowed ? Is there an alternative?

Thanks in advance for any valuable guidance
Hamsa


--

Dave Peterson