ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to concatenate with previous bold cell (https://www.excelbanter.com/excel-worksheet-functions/447926-macro-concatenate-previous-bold-cell.html)

alovell

Macro to concatenate with previous bold cell
 
Can anyone help me with this? I am using pivot tables and I would like a Macro that would concatenate with the most recent, above cell, to create a unique value.

example

[BOLD]Pigs[/BOLD]
201201
201202
201203
[BOLD]Cows[/BOLD]
201201
201202
201203
[BOLD]Sheep[/BOLD]
201201
201202
201203

Which would result in

Pigs201201
Pigs201202
Pigs201203
Cows201201
Cows201202
Cows201203
....



This problem comes up for us a lot here, so a solution would be greatly appreciated. Thanks!


All times are GMT +1. The time now is 02:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com