Formatting data for pivot - single column to multiple.

OneCurtis

New Member
Joined
May 20, 2011
Messages
13
I have a list of values that I need to format for processing and the format of the data isn't suitable in it's current form.

The values are currently in the following format:

ABC
1http://www.example.com/subfolder/page1
2http://www.example.com/subfolder/page2
3Status code: 301
4linked from pages:
5http://www.example.com/subfolder2/page1
6http://www.example.com/subfolder2/page2
7http://www.example.com/subfolder2/page3
8
9http://www.example.com/subfolder/page3
10http://www.example.com/subfolder/page4
11Status code: 301
12linked from pages:
13http://www.example.com/subfolder3/page1

<tbody>
</tbody>
I need the value from C1 to appear in A5:A7, the value from C2 to appear in B5:B7 and the same again for the next set of records starting from C9. There are far too many records to attempt this manually. What's the best way to automate the process, either with a formula or VBA?

Thanks for your help.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Not sure I've understood task correctly, but
try this formula in A5: =IF($C5="","",IF(A4<>"",A4,IF($C4="linked from pages:",$C1,"")))
and copy it to A5:A100 , where A100 is the bottom cell of the resulting range

Formula for B5 is =IF($C5="","",IF(B4<>"",B4,IF($C4="linked from pages:",$C2,"")))
copy it to B5:B100
 
Last edited:
Upvote 0
Or put this formula into A5 and then copy A5 to A5:B100
=IF($C5="","",IF(A4<>"",A4,IF($C4="linked from pages:",INDEX($C1:$C2,COLUMN()),"")))
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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