Adding data from a previous cell

rlarson

New Member
Joined
Feb 25, 2002
Messages
28
I have been struggling with this one for a while. I have an inventory file that I get from a supplier every day, which lists the following data: Part Number; Serial Number. The only problem is that the PN data is listed only once, at the heading for each new Part Number section. Like this:

Part Number Serial Number
9014457 ABC123
ABC234
ABC345
ABC456
ABC567

9101121 ABC678
ABC789 ETC...

The file is usually 2 to 3,000 rows long, with over 200 part numbers. I am looking for a way to add the part number data next to each serial number on the list, basically filling in the Part Number data next to the Serial Number from the header for each section. Do you know of any way to do this other than manually copying and pasting?

Thanks,
Randy
 

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.
On 2002-02-26 13:38, rlarson wrote:
I have been struggling with this one for a while. I have an inventory file that I get from a supplier every day, which lists the following data: Part Number; Serial Number. The only problem is that the PN data is listed only once, at the heading for each new Part Number section. Like this:

Part Number Serial Number
9014457 ABC123
ABC234
ABC345
ABC456
ABC567

9101121 ABC678
ABC789 ETC...

The file is usually 2 to 3,000 rows long, with over 200 part numbers. I am looking for a way to add the part number data next to each serial number on the list, basically filling in the Part Number data next to the Serial Number from the header for each section. Do you know of any way to do this other than manually copying and pasting?

Thanks,
Randy

Lets say that the data start in row 1 including labels: Part numbers in A and serial numbers in B.

In C2 enter: =IF(ISNUMBER(A2),A2,C1)

and give a double click on the little black square in the right lower corner of C2. Then do a copy while C-cells are selected and execute Edit|Paste Special >Values. Delete column A if so desired.

Hope this is what you wanted to do.
 
Upvote 0
If it's what I think it is like then you can use an IF statement. If it lists the part numbers and then the serial numbers, but the first column is blank because they all relate to the same part no. ie:
COL.a COL.b
12345 333
444
555
666

In cell C2 use:
=IF(A2="";C1;A2)

This will then fill in the blanks, but still put the right data in.

If this isn't quite what you were meaning, sorry, and we'll have to try again !!!
 
Upvote 0
Thanks Helen and Aladin, it worked great!

COL.a____COL.b
12345____333
_________444
_________555

I used Helen's suggestion in Col C:
=IF(A4="",C3,A4)

Filled in the right numbers next to each SN!

Much appreciated,
Randy
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,404
Members
448,893
Latest member
AtariBaby

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