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
 
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
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),"")))
that's perfect, thank you so much for your help, time and patience!!!!
 
Upvote 0

Forum statistics

Threads
1,216,131
Messages
6,129,066
Members
449,485
Latest member
greggy

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