How to format a table to show single dates with multiple values?

Moo1987

New Member
Joined
Apr 10, 2017
Messages
9
Hi,

Wondering if someone could help me?

I have a table with dates in column A and values in column B

There are 48 dates for every 1 day over 365 days (E.G 01/04/2016 48 times, then 02/04/2016 48 times and so on over 365 days).

Each date (row) has it's own seperate value next to it.

I need change the table, so there is only one date for every day in Column A, but I need all 48 values for that day in the same row.

E.G
Date123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
01/04/201689755533112232225588878623158621358423555888741123554
02/04/20163612985452365495155698852652256156852156235684623
03/04/2016125695236453563254286343256985215652931456932156

<tbody>
</tbody>
I am sure there is a simple solution, but it has been a very long day.

Thanks for your help in advance.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
"I need change the table, so there is only one date for every day in Column A, but I need all 48 values for that day in the same row."

So what would the result look like for 01/04/2016 ?
All 48 dates strung together in one long continuous number?
Or did you have something else in mind?

What's the highest number a value can have in one of those 48 ?
 
Last edited:
Upvote 0
Hi Special-K99

The result for 01/04/2016,02/042016 and 03/04/2016 would look like the table below.
Comlun A B C AW
Date
1
23
456789101112131415161718192021222324252627
28293031
323334353637383940
41424344454647
48
01/04/2016
8
9
75
55331122
322255
888786231586213584235558887
41123554
02/04/2016
3
6129854523654951556988526522561568521562356846
2
3
03/04/2016 1
2569523645356325428634325698521565293145693215
6

<tbody>
</tbody>

There are 48 columns with the vaules in, but only one date.

I hope this makes sense?
 
Upvote 0
Is this of any help ?
Code:
Sub Testing()

    Dim ray, lr As Long, i As Long
    
Application.ScreenUpdating = False
With Sheet1
    lr = .Cells(Rows.Count, 1).End(xlUp).Row
    For i = 2 To lr Step 48
        ray = .Range("B" & i).Resize(48).Value
        .Cells(i, 2).Resize(, 48).Value = Application.Transpose(ray)
    Next i
    
    Range("C1:C" & lr).SpecialCells(xlBlanks).EntireRow.Delete
    
End With
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Thanks No Sparks,

I used this solution instead =INDEX($B$2:$B$17659,ROWS(C$2:C2)*48-48+COLUMNS($C2:C2)) then copied across and down, but thank you for your time.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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