ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Reformat spreadsheet (https://www.excelbanter.com/excel-worksheet-functions/149070-reformat-spreadsheet.html)

JoP

Reformat spreadsheet
 
Hi everyone

I'm trying to change the format of a spreadsheet to repeat data in certain
cells. My format is currently:

Column C Column D

Part Number Description
Document Number Blank
Document Number Blank
Blank Blank
Part Number Description
Document Number Blank
Blank Blank

What I'd like is to copy the Part Number and Description from Columns C and
D and place them in Columns A and B, repeating as below:

Column A Column B Column C
Column D
Part Number Description Part Number
Description
Part Number Description Document Number Blank
Part Number Description Document Number Blank
Blank Blank Blank
Blank
Part Number Description Part Number
Description
Part Number Description Document Number Blank
Blank Blank Blank
Blank

I have different amounts of document numbers per part number, so it's very
random. I've tried various IF statements, but nothing can take into account
the blanks and the random amount of document numbers.

If anyone can help with a function or some code I'd be very grateful.

Roger Govier

Reformat spreadsheet
 
Hi
In A1 enter
=IF(OR(LEFT(C1)="P",LEFT(C1)="D"),"Part Number","")
in B1 enter
=IF(OR(LEFT(C1)="P",LEFT(C1)="D"),"Description","" )
Copy down as far as required

--
Regards

Roger Govier


"JoP" wrote in message
...
Hi everyone

I'm trying to change the format of a spreadsheet to repeat data in
certain
cells. My format is currently:

Column C Column D

Part Number Description
Document Number Blank
Document Number Blank
Blank Blank
Part Number Description
Document Number Blank
Blank Blank

What I'd like is to copy the Part Number and Description from Columns
C and
D and place them in Columns A and B, repeating as below:

Column A Column B Column C
Column D
Part Number Description Part Number
Description
Part Number Description Document Number
Blank
Part Number Description Document Number
Blank
Blank Blank Blank
Blank
Part Number Description Part Number
Description
Part Number Description Document Number
Blank
Blank Blank Blank
Blank

I have different amounts of document numbers per part number, so it's
very
random. I've tried various IF statements, but nothing can take into
account
the blanks and the random amount of document numbers.

If anyone can help with a function or some code I'd be very grateful.





All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com