Avatar of M. Saad
M. Saad
 asked on

Search and copy the corresponding value from duplicate values into the adjacent cell

Hello
I need your help please in the attached sample file ( original file with data over 100,000 rows)
Column A has many duplicate values and in column S the value is corresponding to this value but its enter only in one cell.
What I want is to copy the value mentioned in column S in front of all corresponding value in column A.
 I hope this clear
LIST-1.xlsx
Microsoft OfficeMicrosoft ExcelVBA

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon
aikimark

attached sample file
File missing
M. Saad

ASKER
sorry, i have attached the sample
aikimark

copy the value mentioned in column S in front of all corresponding
Prepend the S column value to the text in the A column values?
Example:
SMGFB-JS-PM-T-00102A00-GA-E-0060012
SMGFB-JS-PM-T-00102A00-GA-E-0060012
SMGFB-JS-PM-T-00102A00-GA-E-0060012
SMGFB-JS-PM-T-00102A00-GA-E-0060012

Open in new window


Or create a new column A with the column S values?
Example:
New Column A       	Col.1
SMGFB-JS-PM-T-00102	A00-GA-E-0060012
SMGFB-JS-PM-T-00102	A00-GA-E-0060012
SMGFB-JS-PM-T-00102	A00-GA-E-0060012
SMGFB-JS-PM-T-00102	A00-GA-E-0060012

Open in new window


or something else?

======================
corresponding
These two columns don't seem to share any common data.  Are they 'related' by the color coding?

What should happen when there is NO column S data?  An example of this condition is in rows 53-60.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
M. Saad

ASKER
thanks for your concern, please note that

1- color has nothing to do with the data
2- " What should happen when there is NO column S data?  An example of this condition is in rows 53-60." ... nothing should be in the column S.
3 - example for document no from column A " A00-GA-E-0060012" this number start from rows 21-29 but the number "SMGFB-JS-PM-T-00102" is available on row no 26 only.
so i want the code or formula to search for all duplicate no in column A and then search for the value available in column S and then copy this value in the other empty cells in same column S ( so the result will be SMGFB-JS-PM-T-00102 available in all rows from 21-29.)

as you can see in the attached photo , the number highlighted in red is the original input, and the black numbers is what i need to do automatically
Capture.PNG
ASKER CERTIFIED SOLUTION
Subodh Tiwari (Neeraj)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
M. Saad

ASKER
dear Mr. Neeraj
many thanks for your support
Subodh Tiwari (Neeraj)

You're welcome!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
aikimark

Posting an example of what you needed was very helpful.  It would have saved time and clarification questions.

Kudos to Neeraj for an efficient solution.
Subodh Tiwari (Neeraj)

Thanks aikimark!