IF Statement or Macro Help

mrickert

New Member
Joined
Apr 9, 2008
Messages
29
Hello. I need some help please, here's my situation.

Column A has 90,000+ rows of text.

Coulmn B has a price.

Column C has 500+ rows of text.

Column D has a price.


I need to search for each item in Column C and see if it is in Column A. If so, I need to replace Column B with the price in Column D.


Example:
Code:
Column A     Column B     Column C      Column D
123456          1.25       FAS1SA          9.99
999994          2.50       32DAVB         10.50
DATA21        100.00       123456         99.99
123FAS         74.21       IOASHD         10.40
UIDF32          0.04       MASD54          1.11
 
 
Desired Result:
 
Column A     Column B     Column C      Column D
123456         99.99       FAS1SA          9.99
999994          2.50       32DAVB         10.50
DATA21        100.00       123456         99.99
123FAS         74.21       IOASHD         10.40
UIDF32          0.04       MASD54          1.11

Note the change in Column B for the value assocaited with 123456.

Not sure how to approach this. Thanks in advance.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
If you are in Excel 07 or 10
In E2 copy down
=IFERROR(INDEX($A$2:$D$6,MATCH(A2,$C$2:$C$6,0),4),B2)
In previous versions:

=IF(ISNUMBER(MATCH(A2,$C$2:$C$6,0)),INDEX($A$2:$D$6,MATCH(A2,$C$2:$C$6,0),4),B2)
 
Upvote 0
All that seems to do is give me the value of the the B column in the next row:

screen.jpg


(Sorry, not sure how to post Excel code on here)


Any other ideas? Using Excel 97 if that matters.
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,189
Members
452,893
Latest member
denay

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