VBA code to repeat item labels in a column

Wafee

Board Regular
Joined
May 27, 2020
Messages
104
Office Version
  1. 2013
Platform
  1. Windows
Hi, Can you somone help me with this request.

I have data as shown in column A and i need it to be done as in column C for some calculation and once it is done it has be restored as in Column A again. this process needs to be performed in column "A" itself. Consider sheet name as sheet1 and activeworkbook.

It is similar to what is done when we select repeat item lables in a pivot. it has to be done until "Grand total" cell. Thank you in advance.

Book1
ABC
1NameName
2
3
4RajuRaju
5Raju
6Raju
7Raju
8Raju
9Raju
10HariHari
11Hari
12RamRam
13Ram
14Ram
15MoorthyMoorthy
16Moorthy
17Moorthy
18Moorthy
19Grand total
Sheet1
 
Hi Fluff,

I won't be having formulas in column "A" hence the below code is throwing an error saying thta no cells were found. and the formula column changes every week. so can you help me with a code(that doestn't depend on other columns) that reatains first occurance of values in column "A" in that cells it self.
Range("A:A").SpecialCells(xlFormulas).ClearContents
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
The 1st code in post#6 puts a formula into col A & then 2nd code removes it, so you will have formulae in col A unless you have removed them.
 
Upvote 0
The 1st code in post#6 puts a formula into col A & then 2nd code removes it, so you will have formulae in col A unless you have removed them.
that helped, thank you Fluff :)
 
Upvote 0

Forum statistics

Threads
1,223,639
Messages
6,173,499
Members
452,517
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