help writing formula to merge two worksheets

mrfisherman2010

New Member
Joined
Feb 27, 2011
Messages
6
I need help writing a formula. I am trying to update one worksheet based on a matching column from another worksheet.

Worksheet 1: ecEveryoneElse
The NewUserName column in this worksheet contains the new data. There are 98000 records in this worksheet.
Code:
+---------------+---------------+
| A             | B             |
+---------------+---------------+
| UserName      | NewUserName   |	
+---------------+---------------+
| 3282384       |2wsUShrwj45h   |				
| 2293848       |38Ssjdjr423s   |						
| 2047765       |2OSIv0s4i348   |
+---------------+---------------+

Worksheet 2: llo_studentsdemo
The myNewID (B) column in this worksheet needs to be updated when id matches UserName from the other worksheet. There are 133000 records in this worksheet. I need to do this for all records in this worksheet. Also, there are several records with matching id values in this worksheet.
Code:
+---------------+---------------+---...
| A             | B             | C
+---------------+---------------+---...
| id            | myNewID       | nextColumn
+---------------+---------------+---...
| 3282384       | (value is 2wsUShrwj45h after query runs)
| 2293848       | (value is 38Ssjdjr423s after query runs)
| 2047765       | (value is 2OSIv0s4i348 after query runs)
+---------------+---------------+---...

Here is what I want to do:

if ecEveryoneElse.UserName = llo_studentsdemo.id
set llo_studentsdemo.myNewID = ecEveryoneElse.NewUserName
end

Any help writing this formula would be very much appreciated.

Thank you.

Mike
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
My experience with excel formulas is very limited. I'm trying to write the formula and I keep getting syntax errors. I may not be referring to the worksheets and ranges correctly.
 
Upvote 0
When there is a match, the correct value is posted into worksheet llo_studentsdemo column B. This is correct.

However, when there is no match I get N/A. Thanks for the tips. I'm getting closer I can feel it.
 
Upvote 0
Try

=IF(ISNA(VLOOKUP(A2,ecEveryoneElse!A:B,2,FALSE)),"",=VLOOKUP(A2,ecEveryoneElse!A:B,2,FALSE))
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top