VLOOKUP

A

Arup C

Hi Everybody,
I am making a billing system which will pick product prices automatically
from a price list of products. My prices should change automatically
according to latest price. I have products like this
column A column B column C
Product price as 1.11.07 price as on 10.11.07
Milk 12.50 14.00
Chocolate 40.00 50.00
Ice cream 20.00 30.00
Soda 10.00 12.00

now I have created a dynamic named range called pricing which increases a
column with every new price.
Now my question is that is there any way that Vlookup function automatically
change the column index number to the last column of the range (pricing)? in
this case from 2(col b) to 3 (col c)
 
M

Max

One way
Assuming source table in Sheet1, cols A to C (extendable across)
Try something like this in another sheet:
=VLOOKUP(A1,Sheet1!A:Z,COUNTA(Sheet1!$1:$1),0)
where the col index would be determined by the number of filled cells in
row1, which number corresponds to the rightmost col number.
 
C

carlo

=VLOOKUP(A1,pricing,COLUMNS(pricing),FALSE)

columns(pricing) returns you the amount of
columns of the range you enter.
this should work, if pricing is a global range.
if pricing is a sheet range you need to enter:
"sheet1!pricing" instead of just "pricing"
where you change sheet1 to your sheet.

hth

Carlo
 

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

Similar Threads

Searching for last cell address in a row 1
Copy and shift data automaticaly 0
Excell Formula 2
Vlookup help 2
Excell Formula 2
Excel formulation to automate values 3
excel newbie cell update 1
help with macro 3

Top