Add Data to a new column from a CEL to create a dataset.

Murds

New Member
Joined
Mar 12, 2019
Messages
3
Hello all,

I'm completely stumped with something on excel. I'd like to think of myself as a decently proficient user but I just cant get to the bottom of this. I've started a new job in a call centre and we have data that is annoyingly formatted. We have multiple customers and it is formatted a bit like this:

[TABLE="width: 100"]
<tbody>[TR]
[TD]Customer 1[/TD]
[TD]Calls inbound[/TD]
[/TR]
[TR]
[TD]range 1
[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]range 2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]range 3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]range 1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]range 2[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]range 2[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]

What I really want is to add the customer name to a new column so I can pivot the data. So is there a formula that will allow me to fill in a new column based on the customer name (there's over 80 customers).

Essentially so the data will look like this:

[TABLE="width: 200"]
<tbody>[TR]
[TD]Customer 1[/TD]
[TD]Customer 1[/TD]
[TD]inbound calls[/TD]
[/TR]
[TR]
[TD]Customer 1[/TD]
[TD]Range 1[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD]Customer 1[/TD]
[TD]Range 2[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]Customer 1[/TD]
[TD]Range 3[/TD]
[TD]26[/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD]Customer 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD]Range 1[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD]Range 2[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD]Range 3[/TD]
[TD]26[/TD]
[/TR]
</tbody>[/TABLE]

Any help is greatly appreciated.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
How about


Excel 2013/2016
ABC
1Customer 1Customer 1Calls inbound
2Customer 1range 11
3Customer 1range 22
4Customer 1range 35
5Customer 2Customer 2
6Customer 2range 11
7Customer 2range 25
8Customer 2range 26
Run Macros
Cell Formulas
RangeFormula
A1=B1
A2=IF(LEFT(B2,8)="Customer",B2,A1)
 
Upvote 0
How about

Excel 2013/2016
ABC
Customer 1Customer 1Calls inbound
Customer 1range 1
Customer 1range 2
Customer 1range 3
Customer 2Customer 2
Customer 2range 1
Customer 2range 2
Customer 2range 2

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]5[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]5[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]6[/TD]

</tbody>
Run Macros

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A1[/TH]
[TD="align: left"]=B1[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A2[/TH]
[TD="align: left"]=IF(LEFT(B2,8)="Customer",B2,A1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


This worked an absolute treat!
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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