If value of Cell A2 in Sheet1 match's any cell in column A in Sheet2 / Replace Cell B2 in Sheet1 With B2 in Sheet2

Joined
Aug 27, 2014
Messages
3
Hi could use some help. What i have is this below - What i want to do is a VBA code that says if A2 sheet1 can be found in column A of sheet2 replace B2 sheet 1 with what is in B in sheet2. Example is if A2 (John) appears in Column A in Sheet 2, replace B2 sheet1 with whats showing in the following cell in B in this case George. Is this possible? Thanks oh great masters of excel :D

Column A Sheet1Column B Sheet1Column A Sheet2Column B Sheet2
NameNameNameName
JohnBrianJohnGeorge
CaseyLloydCaseyRobert
LakishaDerekLakishaSydney
JasonPaulJasonRyan
CaseyBrianCaseyJeremy
DerekJohnDerekGina
BrianPaulBrianBetty

<tbody>
</tbody>
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Do you need VBA code for this? It can be done with a simple lookup formula!

Try this formula in cell C2 on sheet 1:
=IFERROR(IF(MATCH(A2,Sheet2!$A$2:$A$8,0)>0,Sheet2!B2),B2)
 
Last edited:
Upvote 0
Do you need VBA code for this? It can be done with a simple lookup formula!

Try this formula in cell C2 on sheet 1:
=IFERROR(IF(MATCH(A2,Sheet2!$A$2:$A$8,0)>0,Sheet2!B2),B2)

This was exactly what i needed :). Thank you soooo much.

One more question and i will stop being such a noob :).

This is what im trying to do -

In Cell G2 i have date, in H2 i have the date of 5/14/2015, in L2 i have 5/15/2015. What i want to do is say if G2 contains the word Date and if H2 is greater than L2 that contains another date output yes. Any magic formula for this one? THANK YOU!!!
 
Upvote 0
This was exactly what i needed :). Thank you soooo much.

One more question and i will stop being such a noob :).

This is what im trying to do -

In Cell G2 i have date, in H2 i have the date of 5/14/2015, in L2 i have 5/15/2015. What i want to do is say if G2 contains the word Date and if H2 is greater than L2 that contains another date output yes. Any magic formula for this one? THANK YOU!!!

Would you be looking for something like this:

=IF(AND(G2="date",(H2>L2)),"Yes","")

?
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,831
Members
449,051
Latest member
excelquestion515

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