Repeat Excel Spreadsheet Column Headings on each row until they change

Bering

Board Regular
Joined
Aug 22, 2018
Messages
185
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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Thanks, I think I have it figured out. But do you want the currency type(Column G) attached to the Entity? or the Amount of that currency (Column F)?

Try this:

Book1
ABCDEFG
1Entity 1
2CounterpartyDateTransaction typeAmountCurrency
3Entity 110030/09/2023AA100USD
4Entity 15030/09/2023BB50USD
5Entity 12530/09/2023AA25EUR
6Entity 14630/09/2023CD46USD
7Entity 1500030/09/2023AA5000JPY
8 Entity 2DateTransactionAmountCurrency
9 Counterparty
10Entity 290030/09/2023BB900USD
11Entity 225030/09/2023BB250CHF
Sheet2
Cell Formulas
RangeFormula
A3:A11A3=IF(C4="Counterparty","",IF(C2="Counterparty",C1&F3,IF(A2<>"",SUBSTITUTE(A2,F2,F3),"")))
 
Upvote 1
Solution
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

Forum statistics

Threads
1,215,688
Messages
6,126,209
Members
449,299
Latest member
KatieTrev

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