#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default VLOOKUP

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)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default VLOOKUP

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.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Arup C" wrote:
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)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default VLOOKUP

=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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 02:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"