Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Search range, find value in another col in corresponding row

Good day,

I am trying to find a formula or VBA Code to compare a value on worksheet A
from a range of values on worksheet B. If found, assign the adjacent cell on
Worksheet A, to the value of a corresponding cell on Worksheet B.

Sample Data,
Worksheet 1 Contains
Col M ----------- Col N
1 Project 1 ------- Blank
2 Project 4 ------ Blank


Worksheet 2 Contains
Col D ------------ Col F
1 Project 1 ----- Review
2 Project 2 ----- Prototype
3 Project 3 ----- Evaluation
4 Project 4 ----- Implementation
5 Project 5 ----- Follow Up

Pseudo code:
If Cell M1 Worksheet A is found in Col D on Worksheet 2,
then N1 on Worksheet A = F1 on Worksheet B

I am using: =IsNumber(Match(WorksheetA!M1, WorksheetB!D:D, 0))
to find the cell value in the range.

I just need to figure out how to assign the data in the corresponding cell
where the match is found.

Resulting Data on Worksheet 1 should look like:
Worksheet 1:
Col M ----------- Col N
1 Project 1 ------- Review
2 Project 4 ------ Implementation

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Search range, find value in another col in corresponding row

Try this in N1:

=IF(ISNA(MATCH(M1,WorksheetB!D:D,0)),"",VLOOKUP(M1 ,WorksheetB!D:F,
3,0))

then copy down.

Hope this helps.

Pete

On Oct 1, 1:26*am, Brent E wrote:
Good day,

I am trying to find a formula or VBA Code to compare a value on worksheet A
from a range of values on worksheet B. If found, assign the adjacent cell on
Worksheet A, to the value of a corresponding cell on Worksheet B.

Sample Data,
Worksheet 1 Contains
* *Col M ----------- Col N
1 Project 1 ------- Blank
2 Project 4 *------ Blank

Worksheet 2 Contains
* Col D ------------ Col F
1 Project 1 ----- Review
2 Project 2 ----- Prototype
3 Project 3 ----- Evaluation
4 Project 4 ----- Implementation
5 Project 5 ----- Follow Up

Pseudo code:
If Cell M1 Worksheet A is found in Col D on Worksheet 2,
then N1 on Worksheet A = F1 on Worksheet B

I am using: =IsNumber(Match(WorksheetA!M1, WorksheetB!D:D, 0))
to find the cell value in the range.

I just need to figure out how to assign the data in the corresponding cell
where the match is found.

Resulting Data on Worksheet 1 should look like:
Worksheet 1:
* *Col M ----------- Col N
1 Project 1 ------- Review
2 Project 4 *------ Implementation

Thanks in advance


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Search range, find value in another col in corresponding row

Hi Brent,

I'm not sure what the IsNumber... stuff is doing but the simplest way to
hand this is to use:

=VLOOKUP(M1,Sheet2!$D$1:$F$8,3,FALSE)

Where the Project you want to lookup is in cell M1 of sheet1 and the list of
Projects and their descriptions? are in column F of Sheet2. I only addressed
a range on sheet2 running for 8 rows.

Running VLOOKUP or MATCH against entire columns may slow down Excel if in
fact you are only using the first couple of hundred or thousand rows. You
can also replace the FALSE in the formula above with 0 or even use

=VLOOKUP(M1,Sheet2!$D$1:$F$8,3)

--
Thanks,
Shane Devenshire


"Brent E" wrote:

Good day,

I am trying to find a formula or VBA Code to compare a value on worksheet A
from a range of values on worksheet B. If found, assign the adjacent cell on
Worksheet A, to the value of a corresponding cell on Worksheet B.

Sample Data,
Worksheet 1 Contains
Col M ----------- Col N
1 Project 1 ------- Blank
2 Project 4 ------ Blank


Worksheet 2 Contains
Col D ------------ Col F
1 Project 1 ----- Review
2 Project 2 ----- Prototype
3 Project 3 ----- Evaluation
4 Project 4 ----- Implementation
5 Project 5 ----- Follow Up

Pseudo code:
If Cell M1 Worksheet A is found in Col D on Worksheet 2,
then N1 on Worksheet A = F1 on Worksheet B

I am using: =IsNumber(Match(WorksheetA!M1, WorksheetB!D:D, 0))
to find the cell value in the range.

I just need to figure out how to assign the data in the corresponding cell
where the match is found.

Resulting Data on Worksheet 1 should look like:
Worksheet 1:
Col M ----------- Col N
1 Project 1 ------- Review
2 Project 4 ------ Implementation

Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Search range, find value in another col in corresponding row

That looks like that will work.Thanks Guys.

"ShaneDevenshire" wrote:

Hi Brent,

I'm not sure what the IsNumber... stuff is doing but the simplest way to
hand this is to use:

=VLOOKUP(M1,Sheet2!$D$1:$F$8,3,FALSE)

Where the Project you want to lookup is in cell M1 of sheet1 and the list of
Projects and their descriptions? are in column F of Sheet2. I only addressed
a range on sheet2 running for 8 rows.

Running VLOOKUP or MATCH against entire columns may slow down Excel if in
fact you are only using the first couple of hundred or thousand rows. You
can also replace the FALSE in the formula above with 0 or even use

=VLOOKUP(M1,Sheet2!$D$1:$F$8,3)

--
Thanks,
Shane Devenshire


"Brent E" wrote:

Good day,

I am trying to find a formula or VBA Code to compare a value on worksheet A
from a range of values on worksheet B. If found, assign the adjacent cell on
Worksheet A, to the value of a corresponding cell on Worksheet B.

Sample Data,
Worksheet 1 Contains
Col M ----------- Col N
1 Project 1 ------- Blank
2 Project 4 ------ Blank


Worksheet 2 Contains
Col D ------------ Col F
1 Project 1 ----- Review
2 Project 2 ----- Prototype
3 Project 3 ----- Evaluation
4 Project 4 ----- Implementation
5 Project 5 ----- Follow Up

Pseudo code:
If Cell M1 Worksheet A is found in Col D on Worksheet 2,
then N1 on Worksheet A = F1 on Worksheet B

I am using: =IsNumber(Match(WorksheetA!M1, WorksheetB!D:D, 0))
to find the cell value in the range.

I just need to figure out how to assign the data in the corresponding cell
where the match is found.

Resulting Data on Worksheet 1 should look like:
Worksheet 1:
Col M ----------- Col N
1 Project 1 ------- Review
2 Project 4 ------ Implementation

Thanks in advance

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
IF with Search/Find??? TotallyConfused Excel Worksheet Functions 5 August 1st 08 10:05 AM
Search range for text not in another range simon howard Excel Discussion (Misc queries) 3 March 28th 07 08:44 PM
Search range of cells, find a value, output adjoining cell. How? nyys Excel Worksheet Functions 3 January 5th 06 01:48 PM
Can Search find 2 or more "/"? Wind54Surfer Excel Discussion (Misc queries) 2 February 22nd 05 04:31 PM
How do I use "find" to search whole workbook? Sholtzy Excel Discussion (Misc queries) 2 January 14th 05 12:51 AM


All times are GMT +1. The time now is 02:32 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"