ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   clarification on VLOOKUP (https://www.excelbanter.com/excel-discussion-misc-queries/224010-clarification-vlookup.html)

Hamsa

clarification on VLOOKUP
 
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

Stefi

clarification on VLOOKUP
 
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:

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

clarification on VLOOKUP
 
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

Gary F Shelton

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



All times are GMT +1. The time now is 10:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com