Solved

Need a formula in excel

Posted on 2011-03-17
13
215 Views
Last Modified: 2012-06-21
Hi, I have an excel file like below.
SV_plates	Row	Col	IDs	sample
SVI_01	A	1	1045	010-006P
SVI_01	B	1	1270	032-006
SVI_01	C	1	1274	034-014P
SVI_01	D	1	1276	035-016B
SVI_01	E	1	1277	038-022
SVI_01	F	1	1278	045-012
SVI_01	G	1	1282	047-011P

Open in new window

I want to add one column which is the value in the first column respectively. The condition is the cell value in 5th column matchs the value in the 4th column.

Thanks.
0
Comment
Question by:zhshqzyc
13 Comments
 
LVL 3

Expert Comment

by:CombatGold1
ID: 35156723
I'm not entirely sure what you need. Could you specify what result you expect in the new column on each row?
0
 

Author Comment

by:zhshqzyc
ID: 35156893
Look at this
SVII_31	G	4	3291	1234
SVI_03	F	10	3965	3291	SVII_31

Open in new window

3291 matchs , then return "SVII_31"
0
 

Author Comment

by:zhshqzyc
ID: 35157097
More explaintion:
In the above example, Cell E2 value is "3291", then we search D1:D65536, find D1="3291", then we add A1="SVII_31" to the new column. If not found, then noing added or add "NA" something.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35157127
zhshqzyc can you attach your sheet or make a smaller sheet please?

Or fill in the one am attaching and send it back.
Sample.xls
0
 

Author Comment

by:zhshqzyc
ID: 35157292
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35157380
I have added a formula which is going to match if column E=D then put A otherwise put N/A.

Is this what you want?
If not could you clarify more please. If you can give an example from the sheet itself it will be better.
PlateMatchMergeSource-updated.xls
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:zhshqzyc
ID: 35157469
No. Your formula is
=IF(E2=D2,A2,"N/A")

Open in new window

I want to search entire column D to lookup any cell's value match E2, Than I copy the formula accross the sheet. I guess we need to use vlookup or match.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35157691
0
 

Author Comment

by:zhshqzyc
ID: 35157798
In this example, it should nothing found. For example, Sample=10037, search column D, not found at all. But you just return a "SVI_01". It is incorrect.
0
 

Author Comment

by:zhshqzyc
ID: 35157830
And I want when copy the formula, the scope is from row 2 to the end. Currently it is dynamically changed.
=IF(ISERROR(LOOKUP(E16,D16:D813,A16:A813)),"N/A",A16)

Open in new window

0
 
LVL 24

Expert Comment

by:jimyX
ID: 35157916
Sorry forgot to fix the cells. Here is the update:
PlateMatchMergeSource-updated-3.xls
0
 

Author Comment

by:zhshqzyc
ID: 35158053
Sample=10037, still incorrect.
0
 
LVL 4

Accepted Solution

by:
rowanscott earned 50 total points
ID: 35164969
Hi

I have just made macro to update all the rows whenever you change the worksheet

There didnt seem to be many matches. I altered your data a bit to test it and it seems to work

You will have to enable macros for this to work.

Best Regards

Rowan
Copy-of-PlateMatchMergeSource.xls
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now