Moving Titles

Vegas01

New Member
Joined
Jun 15, 2021
Messages
43
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone

I was wondering how do I get the the title (hightlighted in bold) to join with the Total (in red) in the each section of data or at least putting the heading on the same line with the total?

In the CSV file we receive, it groups type of data together, what I need it the total amounts, for invoicing purposes. (I had a thought of something like everytime you have a blank line do this???)

I hope I have explained it well enough.

Thanks in advance.



__Packed Patient Days__
WardBulk Order Days@TotalCD Bulk Order Days@TotalCD Mixed Bulk Order Days@Total
A18890.018.8900.01000.010
A24550.014.5500.01000.010
A36300.016.30280.010.2800.010
A45320.015.3200.01000.010
A5210.010.2100.01000.010
Total252725.27280.2800
__Courier Fees__
DateCost
Total0
__Fractional Tablets__
FractionsWithoutAlternativeFractionsWithoutAlternativeFeeFractionsWithAlternativeFractionsWithAlternativeFee
16160.0100.01
__Chart Care__
Signing SheetsPagesSummary SheetsPagesNRMC SheetsNRMC PagesFeeNRMC FeeTotal
Aged Care by MPS0000000.1000
Community by MPS0000000.1000
Aged Care in Pharmacy0014000.1000.2
Community in Pharmacy0000000.1000
Totals0014000.2
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    tcn = Table.ColumnNames(Source),
    lst = Table.Column(Source,tcn{0}),
    lst1 = List.Accumulate({0..List.Count(lst)-1}, {}, (s,c)=> let lc = lst{c} in s & 
                {(
                    if Text.Start(Text.From(lc),5) <> "Total" then 
                        lc 
                    else 
                        lc & " " & List.Select(List.Reverse(s), each Text.Start(_,1) = "_"){0}
                )}
            ),
    tbl = Table.FromColumns({lst1} & List.Skip(Table.ToColumns(Source),1), tcn)
in
    tbl
 
Upvote 0
Ok thanks for the JGordon11, I will give that a go in the next couple of days
 
Upvote 0

Similar threads

Forum statistics

Threads
1,223,641
Messages
6,173,506
Members
452,518
Latest member
SoerenB

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