Repeat Excel Spreadsheet Column Headings on each row until they change

Bering

Board Regular
Joined
Aug 22, 2018
Messages
186
Office Version
  1. 2016
Platform
  1. Windows
Hello,
I have an excel extract from an accounting system that contains sets of figures for multiple entities, in sequence one below the other. The entity's name appears once in column C, below there is the string "Counterparty" and the rest of the column is blank until the next set of data.
Figures are in column C: M, the number of rows for each set is variable.

I am trying to create unique values in column A by concatenating the corresponding Column Headings with the amount in Column I.
Below I am showing the result I am trying to achieve, possibly with formulas, but vba would also be fine as.
Appreciate any suggestions, thanks!

Entity 1
Counterparty
Date
Transaction type
AmountCurrency
Entity110030/09/2023AA100USD
Entity15030/09/2023BB50USD
Entity12530/09/2023AA25EUR
Entity14630/09/2023CD46USD
Entity1500030/09/2023AA5000JPY
Entity 2
Counterparty
Date
Transaction
AmountCurrency
Entity2900
30/09/2023
BB900USD
Entity225030/09/2023BB250CHF
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Is the table you posted only your expectation?

What is in Column I in your original data? You only seem to have 5 columns, so only columns C to G, and no I?

Please use xl2bb if at all possible. If not please label your columns. Please help the forum help you, and give a complete view of your question.

Thanks in advance.
 
Upvote 0
Is the table you posted only your expectation?

What is in Column I in your original data? You only seem to have 5 columns, so only columns C to G, and no I?

Please use xl2bb if at all possible. If not please label your columns. Please help the forum help you, and give a complete view of your question.

Thanks in advance.
Thank you and apologies for the typo, yes what I posted is my expectation. Columns C to G, thanks 🙏
 
Upvote 0
I still cannot help. What is your original data? What is in column I?


It also seems like you have triple merged rows or double line breaks after "Entity Name" and a double merged rows or a single line break after "Counterparty".
Why?
 
Upvote 0
I still cannot help. What is your original data? What is in column I?

I am trying to create unique values in column A by concatenating the corresponding Column Headings with the amount in Column G, I typed I by mistake, sorry 😞
 
Upvote 0
As I have said, please post your starting data?
 
Upvote 0
I am trying to create unique values in column A by concatenating the corresponding Column Headings with the amount in Column G, I typed I by mistake, sorry 😞
Also the concatenation is not a problem once the main issue of repeating the relevant headings is sorted
As I have said, please post your starting data?
sorry but the original data is confidential.
As I have said, please post your starting data?
My bad, original data, as I said the number of rows is variable, HTH

Entity 1
Counterparty
Date
Transaction type
AmountCurrency
30/09/2023AA100USD
30/09/2023BB50USD
30/09/2023AA25EUR
30/09/2023CD46USD
30/09/2023AA5000JPY
Entity 2
Counterparty
Date
Transaction
AmountCurrency

30/09/2023
BB900USD
30/09/2023BB250CHF
 
Upvote 0
Also the concatenation is not a problem once the main issue of repeating the relevant headings is sorted

sorry but the original data is confidential.

My bad, original data, as I said the number of rows is variable, HTH

Entity 1
Counterparty
Date
Transaction type
AmountCurrency
30/09/2023AA100USD
30/09/2023BB50USD
30/09/2023AA25EUR
30/09/2023CD46USD
30/09/2023AA5000JPY
Entity 2
Counterparty
Date
Transaction
AmountCurrency

30/09/2023
BB900USD
30/09/2023BB250CHF
Also the concat is with column F not G... sorry but that is not really an issue, I can deal with the contact. I just need the relevant Entity Name to be repeated in column A. Sorry fot the confusion.
 
Upvote 0
So, this is taking the column heading of G (Which I am guessins is always "Currency", with the value of column concatenated and putting it in column A.

I am sure that is not what you want. But I have to guess because I don't understand. Please post your data (sanitize it to keep your confidentiality). And PLEASE PLEASE PLEASE label your columns with the column letters!

Book1
ABCDEFGH
1Entity 1
2CounterpartyDateTransaction typeAmountCurrency
3Currency USD30/09/2023AA100USD
4Currency USD30/09/2023BB50USD
5Currency EUR30/09/2023AA25EUR
6Currency USD30/09/2023CD46USD
7Currency JPY30/09/2023AA5000JPY
8 Entity 2DateTransactionAmountCurrency
9 Counterparty
10Currency USD30/09/2023BB900USD
11Currency CHF30/09/2023BB250CHF
Sheet2
Cell Formulas
RangeFormula
A3:A11A3=IF(C3="","Currency " &G3,"")






 
Last edited:
Upvote 0
Book2
ABCDEFG
1Entity 1
2CounterpartyDateTransaction typeAmountCurrency
330/09/2023AA100USD
430/09/2023BB50USD
530/09/2023AA25EUR
630/09/2023CD46USD
730/09/2023AA5000JPY
8Entity 2
9CounterpartyDateTransaction typeAmountCurrency
1030/09/2023BB900USD
1130/09/2023BB250CHF
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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