Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always work

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default excel lookup help... already have formula but doesnt always work

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:

=IF(isna(LOOKUP(E138,'Pipe Specs'!B:B,false)),"Not Found",LOOKUP(E138,'Pipe
Specs'!B:B,'Pipe Specs'!C:C))

"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always wo

hey there buddy.. I tried your formula and it returns a "#N/A"

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:

=IF(isna(LOOKUP(E138,'Pipe Specs'!B:B,false)),"Not Found",LOOKUP(E138,'Pipe
Specs'!B:B,'Pipe Specs'!C:C))

"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always wo

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:

=IF(isna(LOOKUP(E138,'Pipe Specs'!B:B,false)),"Not Found",LOOKUP(E138,'Pipe
Specs'!B:B,'Pipe Specs'!C:C))

"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default excel lookup help... already have formula but doesnt always wo

Sorr should be Vlookup not lookup in the formula

"LoboNetwork" wrote:

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:

=IF(isna(LOOKUP(E138,'Pipe Specs'!B:B,false)),"Not Found",LOOKUP(E138,'Pipe
Specs'!B:B,'Pipe Specs'!C:C))

"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always wo

hello again,

I tried putting in VLOOKUP instead of LOOKUP. It still returns #value into
the cell. Any suggestions or ideas? Hmm it must be something simple.
Thanks again for the prompt reply.

"Jim Thomlinson" wrote:

Sorr should be Vlookup not lookup in the formula

"LoboNetwork" wrote:

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:

=IF(isna(LOOKUP(E138,'Pipe Specs'!B:B,false)),"Not Found",LOOKUP(E138,'Pipe
Specs'!B:B,'Pipe Specs'!C:C))

"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default excel lookup help... already have formula but doesnt always wo

So let me see if I have this straight. You want to look up Spec based on the
name...

Try =IF(isna(vLOOKUP(E138,'Pipe Specs'!B:E,1,false)),"Not
Found",vLOOKUP(E138,'Pipe Specs'!B:E, 2))

The 2 of the offset to the right of the B column (so return the valuye in
column C)
"LoboNetwork" wrote:

hello again,

I tried putting in VLOOKUP instead of LOOKUP. It still returns #value into
the cell. Any suggestions or ideas? Hmm it must be something simple.
Thanks again for the prompt reply.

"Jim Thomlinson" wrote:

Sorr should be Vlookup not lookup in the formula

"LoboNetwork" wrote:

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:


"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always wo

hey Jim,

I've used the updated code. It only seems to work when the items are
sorted. If i add anything to the bottom of the list, it gets a different "C"
column number. I need it to work without having to resort somehow... hmm
i'll try play around with it. Any help would be greatly appreciated though.

"Jim Thomlinson" wrote:

So let me see if I have this straight. You want to look up Spec based on the
name...

Try =IF(isna(vLOOKUP(E138,'Pipe Specs'!B:E,1,false)),"Not
Found",vLOOKUP(E138,'Pipe Specs'!B:E, 2))

The 2 of the offset to the right of the B column (so return the valuye in
column C)
"LoboNetwork" wrote:

hello again,

I tried putting in VLOOKUP instead of LOOKUP. It still returns #value into
the cell. Any suggestions or ideas? Hmm it must be something simple.
Thanks again for the prompt reply.

"Jim Thomlinson" wrote:

Sorr should be Vlookup not lookup in the formula

"LoboNetwork" wrote:

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:


"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always wo

actually on further inspection, it doesnt seem to say "Not Found" at all
now.... with the new formula... it just seems to get the same value of 102.3

*confused*

"Jim Thomlinson" wrote:

So let me see if I have this straight. You want to look up Spec based on the
name...

Try =IF(isna(vLOOKUP(E138,'Pipe Specs'!B:E,1,false)),"Not
Found",vLOOKUP(E138,'Pipe Specs'!B:E, 2))

The 2 of the offset to the right of the B column (so return the valuye in
column C)
"LoboNetwork" wrote:

hello again,

I tried putting in VLOOKUP instead of LOOKUP. It still returns #value into
the cell. Any suggestions or ideas? Hmm it must be something simple.
Thanks again for the prompt reply.

"Jim Thomlinson" wrote:

Sorr should be Vlookup not lookup in the formula

"LoboNetwork" wrote:

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:


"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default excel lookup help... already have formula but doesnt always wo

Yesssss!!

I have found the solution after playing around with it!

=IF(ISNA(VLOOKUP(E159,'Pipe Specs'!B:E,1,0)),"Not Found",VLOOKUP(E159,'Pipe
Specs'!B:E, 2,0))

Hope that helps anyone with similar problems.

Thank you Jim for all your help.

"Jim Thomlinson" wrote:

So let me see if I have this straight. You want to look up Spec based on the
name...

Try =IF(isna(vLOOKUP(E138,'Pipe Specs'!B:E,1,false)),"Not
Found",vLOOKUP(E138,'Pipe Specs'!B:E, 2))

The 2 of the offset to the right of the B column (so return the valuye in
column C)
"LoboNetwork" wrote:

hello again,

I tried putting in VLOOKUP instead of LOOKUP. It still returns #value into
the cell. Any suggestions or ideas? Hmm it must be something simple.
Thanks again for the prompt reply.

"Jim Thomlinson" wrote:

Sorr should be Vlookup not lookup in the formula

"LoboNetwork" wrote:

ah i got it to say #VALUE now
but its still not the right value... hehe

The #n/a was occuring because i had a <return in my formula...hmmm
I need a solution that works without having to sort... there are many of
these documents and tons of pipe specs.

Thanks for all your help above :)

"Jim Thomlinson" wrote:

When you add the new specs do you re-sort the sheet? If not try resorting the
sheet and see if it makes a difference.

The VLookup function has a third optional argument

=Vlookup(What, In Where, How) The How part is a True or False. If you do not
specify the How argument then you must make sure that your source data is
sorted or you may not find what you are looking for. Not specifying is the
same as adding True which finds the closest match, not an exact match. If you
specify False then only exact matches are returned.

That being said you could change your formula to:


"LoboNetwork" wrote:

Hello,

I have a spreadsheet with two different sheets.
Sheet 2 has Pipe Specs..

ie. sheet 2
column 2 has "names"
column 3 has "inches"
name1 32.1
name2 64.1
etc

sheet 1 has a lot more data. It has the pipe spec names as well... and
there is a formula that I created to grab data from sheet2 and put it in the
adjacent cell in sheet1.

so in sheet 1.. i say i have "name1"... the cell beside it contains a
formula that will automatically put in 32.1.

The formula i used is-

=IF(LOOKUP(E138,'Pipe Specs'!B:B)=E138,LOOKUP(E138,'Pipe Specs'!B:B,'Pipe
Specs'!C:C),"Not Found")

the problem i have is.. that when i add a new pipe spec in sheet2... it
comes up as "Not Found" on sheet1.... but all the older ones get the right
inches..

any help would be greatly appreciated. I think i am missing somethign simple.

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
with Excel 2007, f9 doesnt work. please help. nihan tugcu Excel Discussion (Misc queries) 1 January 5th 10 08:31 AM
when i type txt in excel doesnt work excel worksheet functions to be active Excel Worksheet Functions 0 October 18th 09 12:01 PM
Formula doesnt work when copy in different cell Mat Excel Discussion (Misc queries) 3 April 20th 07 08:34 PM
In excel my bold command doesnt work? Parvez Ansari Excel Worksheet Functions 3 March 10th 05 10:47 PM
Formula doesnt work Kevin Excel Worksheet Functions 2 February 24th 05 12:57 AM


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

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"