clarification on VLOOKUP

H

Hamsa

VLOOKUP(lookup_value,table_array,col_index_num,range_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
 
S

Stefi

If your table_array is, say A:C, then if you want to retrieve result from,
say column C, col_index_num must be 3 (3rd column of table_array). It has no
relation with month. Check your layout or post the task you want to do!

Regards,
Stefi

„Hamsa†ezt írta:
 
D

Dave Peterson

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
 
G

Gary F Shelton

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top