Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default How to add a cell value to VLOOKUP?

In my "Main Board Parts" tab I use the following in one of my cells:
=IF(ISERROR(VLOOKUP(TRIM($H34),Inventory!$M$2:$W$1 350,11,0)),"Not
Found",VLOOKUP(TRIM($H34),Inventory!$M$2:$W$1350,1 1,0))
A "Not Found" message is returned if the number I'm looking for does not
exist.
I also use the Trim feature to make sure there are no spaces in the text I'm
looking for.

H34 is a number, in my current workbook tab (Main Board Parts) I want to
look up in my workbook's "Inventory" tab.
M2 thru W1350 are the rows of data I look thru so I can find what I'm
looking for in my main Inventory worksheet tab.

Here is what I would like to be able to do; when I add more columns to my
inventory tab, my VLOOKUP doesn't always update the W1350 value in the
formula string.
I would like to have two cells that have the values M2 and the W1350.
Now when I add more columns I don't have to go thru and re-modify each
formula throught out the workbook.
To give you a rough idea on how big my workbook is; the inventory page is
~50 rows wide and over 1350 columns long. I have over 30 tabs and the tabs
range from 10 rows to close to 100 rows long each.

Here is what I want it to look like:
=IF(ISERROR(VLOOKUP(TRIM($H34),Inventory!$M"Formul a!A1":$W"Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),Inventory!$M$"Formula!A1 ":$W$"Formula!A2",11,0))

In the "Formula" tab:
A1 = 2
A2 = 1350

How can I make this work?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to add a cell value to VLOOKUP?

Replace the table array references in your formula, ie: Inventory!$M$2:$W$1350
with this expression using INDIRECT:

INDIRECT("Inventory!M"&A1&":W"&A2)

where the params
A1 = 2
A2 = 1350

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"engel59" wrote:
In my "Main Board Parts" tab I use the following in one of my cells:
=IF(ISERROR(VLOOKUP(TRIM($H34),Inventory!$M$2:$W$1 350,11,0)),"Not
Found",VLOOKUP(TRIM($H34),Inventory!$M$2:$W$1350,1 1,0))
A "Not Found" message is returned if the number I'm looking for does not
exist.
I also use the Trim feature to make sure there are no spaces in the text I'm
looking for.

H34 is a number, in my current workbook tab (Main Board Parts) I want to
look up in my workbook's "Inventory" tab.
M2 thru W1350 are the rows of data I look thru so I can find what I'm
looking for in my main Inventory worksheet tab.

Here is what I would like to be able to do; when I add more columns to my
inventory tab, my VLOOKUP doesn't always update the W1350 value in the
formula string.
I would like to have two cells that have the values M2 and the W1350.
Now when I add more columns I don't have to go thru and re-modify each
formula throught out the workbook.
To give you a rough idea on how big my workbook is; the inventory page is
~50 rows wide and over 1350 columns long. I have over 30 tabs and the tabs
range from 10 rows to close to 100 rows long each.

Here is what I want it to look like:
=IF(ISERROR(VLOOKUP(TRIM($H34),Inventory!$M"Formul a!A1":$W"Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),Inventory!$M$"Formula!A1 ":$W$"Formula!A2",11,0))

In the "Formula" tab:
A1 = 2
A2 = 1350

How can I make this work?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default How to add a cell value to VLOOKUP?

Thanks for the quick reply.
If I placed A1 and A2 under tab Formula would the formula look like:

=IF(ISERROR(VLOOKUP(TRIM($H34),INDIRECT(Inventory! $M"&Formula!A1&":$W"&Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),INDIRECT(Inventory!$M"&F ormula!G1&":$W"&Formula!A2",11,0))

Would this be correct or do I have too many double quotes (") or ands (&)?
Do I need the dallor sign to lock it to that cell?
I would be doing a cut and paste down the row of the other cells.

"Max" wrote:

Replace the table array references in your formula, ie: Inventory!$M$2:$W$1350
with this expression using INDIRECT:

INDIRECT("Inventory!M"&A1&":W"&A2)

where the params
A1 = 2
A2 = 1350

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"engel59" wrote:
In my "Main Board Parts" tab I use the following in one of my cells:
=IF(ISERROR(VLOOKUP(TRIM($H34),Inventory!$M$2:$W$1 350,11,0)),"Not
Found",VLOOKUP(TRIM($H34),Inventory!$M$2:$W$1350,1 1,0))
A "Not Found" message is returned if the number I'm looking for does not
exist.
I also use the Trim feature to make sure there are no spaces in the text I'm
looking for.

H34 is a number, in my current workbook tab (Main Board Parts) I want to
look up in my workbook's "Inventory" tab.
M2 thru W1350 are the rows of data I look thru so I can find what I'm
looking for in my main Inventory worksheet tab.

Here is what I would like to be able to do; when I add more columns to my
inventory tab, my VLOOKUP doesn't always update the W1350 value in the
formula string.
I would like to have two cells that have the values M2 and the W1350.
Now when I add more columns I don't have to go thru and re-modify each
formula throught out the workbook.
To give you a rough idea on how big my workbook is; the inventory page is
~50 rows wide and over 1350 columns long. I have over 30 tabs and the tabs
range from 10 rows to close to 100 rows long each.

Here is what I want it to look like:
=IF(ISERROR(VLOOKUP(TRIM($H34),Inventory!$M"Formul a!A1":$W"Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),Inventory!$M$"Formula!A1 ":$W$"Formula!A2",11,0))

In the "Formula" tab:
A1 = 2
A2 = 1350

How can I make this work?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to add a cell value to VLOOKUP?

You would need to fix the points to A1 & A2 in the INDIRECT, since the concat
string is supposed to resolve to the table array, which is meant to be fixed
for propagation purposes.

In your expression, try amending your table arrays:
INDIRECT(Inventory!$M"&Formula!A1&":$W"&Formula!A2 "
INDIRECT(Inventory!$M"&Formula!G1&":$W"&Formula!A2 "

to these:
=INDIRECT("Inventory!$M"&Formula!$A$1&":$W"&Formul a!$A$2)
=INDIRECT("Inventory!$M"&Formula!$G$1&":$W"&Formul a!$A$2)

It should work fine
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"engel59" wrote:
Thanks for the quick reply.
If I placed A1 and A2 under tab Formula would the formula look like:

=IF(ISERROR(VLOOKUP(TRIM($H34),INDIRECT(Inventory! $M"&Formula!A1&":$W"&Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),INDIRECT(Inventory!$M"&F ormula!G1&":$W"&Formula!A2",11,0))

Would this be correct or do I have too many double quotes (") or ands (&)?
Do I need the dallor sign to lock it to that cell?
I would be doing a cut and paste down the row of the other cells.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default How to add a cell value to VLOOKUP?

Thank you, I'll give it a try.

"Max" wrote:

You would need to fix the points to A1 & A2 in the INDIRECT, since the concat
string is supposed to resolve to the table array, which is meant to be fixed
for propagation purposes.

In your expression, try amending your table arrays:
INDIRECT(Inventory!$M"&Formula!A1&":$W"&Formula!A2 "
INDIRECT(Inventory!$M"&Formula!G1&":$W"&Formula!A2 "

to these:
=INDIRECT("Inventory!$M"&Formula!$A$1&":$W"&Formul a!$A$2)
=INDIRECT("Inventory!$M"&Formula!$G$1&":$W"&Formul a!$A$2)

It should work fine
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"engel59" wrote:
Thanks for the quick reply.
If I placed A1 and A2 under tab Formula would the formula look like:

=IF(ISERROR(VLOOKUP(TRIM($H34),INDIRECT(Inventory! $M"&Formula!A1&":$W"&Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),INDIRECT(Inventory!$M"&F ormula!G1&":$W"&Formula!A2",11,0))

Would this be correct or do I have too many double quotes (") or ands (&)?
Do I need the dallor sign to lock it to that cell?
I would be doing a cut and paste down the row of the other cells.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default How to add a cell value to VLOOKUP?

Max,
Thank you so much...got it to work:

=IF(ISERROR(VLOOKUP(TRIM($H22),INDIRECT("Inventory !$BF"&'Main Index'!$G$1&"
: $BG" &'Main Index'!$G$2),2,0)),"Not
Found",VLOOKUP(TRIM($H22),INDIRECT("Inventory!$BF" &'Main Index'!$G$1&" : $BG"
&'Main Index'!$G$2),2,0))

Inventory is where I get my info
Main Index is where I placed my VLOOKUP top and bottom values.

Question:
Is the and sign (&) used to concatinate?
Why are ther only 3 double-quotes (") used?
INDIRECT("Inventory!$BF"&'Main Index'!$G$1&" : $BG" &'Main Index'!$G$2)

"engel59" wrote:

Thank you, I'll give it a try.

"Max" wrote:

You would need to fix the points to A1 & A2 in the INDIRECT, since the concat
string is supposed to resolve to the table array, which is meant to be fixed
for propagation purposes.

In your expression, try amending your table arrays:
INDIRECT(Inventory!$M"&Formula!A1&":$W"&Formula!A2 "
INDIRECT(Inventory!$M"&Formula!G1&":$W"&Formula!A2 "

to these:
=INDIRECT("Inventory!$M"&Formula!$A$1&":$W"&Formul a!$A$2)
=INDIRECT("Inventory!$M"&Formula!$G$1&":$W"&Formul a!$A$2)

It should work fine
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"engel59" wrote:
Thanks for the quick reply.
If I placed A1 and A2 under tab Formula would the formula look like:

=IF(ISERROR(VLOOKUP(TRIM($H34),INDIRECT(Inventory! $M"&Formula!A1&":$W"&Formula!A2",11,0)),"Not
Found",VLOOKUP(TRIM($H34),INDIRECT(Inventory!$M"&F ormula!G1&":$W"&Formula!A2",11,0))

Would this be correct or do I have too many double quotes (") or ands (&)?
Do I need the dallor sign to lock it to that cell?
I would be doing a cut and paste down the row of the other cells.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to add a cell value to VLOOKUP?

"engel59" wrote:
Max,
Thank you so much...got it to work


Glad to hear. Celebrate your success, click the YES button in that response

Is the and sign (&) used to concatenate?


Yes, its a much shorter way, instead of using CONCATENATE

Why are there only 3 double-quotes (") used?
INDIRECT("Inventory!$BF"&'Main Index'!$G$1&" : $BG" &'Main Index'!$G$2)


If you look closely, there are actually 4 double quotes (2 pairs)
involved in your exp above, viz:

"Inventory!$BF"
" : $BG"

It must be in pairs. Whatever is within the double quotes
are just static text strings.

And if above helps, pl click the YES button below as well.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---

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-cell range in formula changes when copied to another cell pixiemom Excel Discussion (Misc queries) 2 April 1st 09 12:16 AM
In Cell Validation List & Linked Cell VLOOKUP BEEZ Excel Discussion (Misc queries) 7 July 1st 07 07:17 PM
How do I. VLOOKUP & BRING BACK THE CELL BELOW THE CELL WHICH IS FO Chris Excel Worksheet Functions 2 November 16th 06 02:42 AM
Vlookup for more than one cell Sweetetc Excel Discussion (Misc queries) 7 July 22nd 06 08:00 PM
vlookup is returning a value one cell above the correct cell. dbaker4 Excel Worksheet Functions 4 April 20th 06 08:21 PM


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

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

About Us

"It's about Microsoft Excel"