Identify range based on multiple criteria and replace with value based on another value

Shummy

New Member
Joined
Aug 5, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello.

Thanks for your help.

I have a large data set in which I need to identify the range in Column C based on the repeated values in 2 columns. Once the range is identified, I need to replace the values in the range based on a value in Column D ({CandidateHeader.Email}). For Column C, all User Names will be replaced with the name corresponding to the value {CandidateHeader.Email}.

Sample set below:

Req IDCdd IDUserCorrespondence
12345A98765User A
12345A98765User BRandom Text
12345A98765User C{CandidateHeader.Email}
12345A98765User ARandom Text
12345A98765User ARandom Text
Expected result:

Req IDCdd IDUserCorrespondence
12345A98765User C
12345A98765User CRandom Text
12345A98765User C{CandidateHeader.Email}
12345A98765User CRandom Text
12345A98765User CRandom Text

The Req ID and Cdd ID won't all necessarily be 5 lines. For {CandidateHeader.Email}, most cases will only have one User name corresponding to it, however if there is a case in which {CandidateHeader.Email} appears twice in a range, it will pick up only the first occurrence.

I appreciate the help.

Thanks.

Regards,
Chris
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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