macro help

rickblunt

Well-known Member
Joined
Feb 18, 2008
Messages
609
Office Version
  1. 2019
Platform
  1. Windows
Greetings - I am using the following code in a workbook to quickly autofill the data on the last row down to the next row....

VBA Code:
Dim LR As Long

    Sheets("Fume Scrubbers").Activate
    LR = Range("A" & Rows.Count).End(xlUp).Row
    Range("A" & LR).Resize(, 21).AutoFill Destination:=Range("A" & LR).Resize(2, 21)

The workbook has 67 worksheets in it (I use the above snippet for each sheet) and the macro runs perfectly on every sheet - except for 1 sheet! I have looked at this sheet intensively for anything that might be different from the others and I can find nothing that is different. There is not any coding on the worksheet itself, there are nothing in one of the cells somewhere else on the sheet, I do not get any error messages, the debugger cycles through fine - just nothing happens when the macro runs - I am stumped. Does anyone have an idea of what I should check for?
 
I agree with Joe, are you sure col A has values all the way down, rather than (for instance) col B with col A being hidden?
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Joe,
yes - that is what has got me so stumped, pretty basic macro and I use it a lot. Some of this data is proprietary so I do not think that I can do that directly, I am thinking of taking this specific sheets value to a new WS, see how it works; then copy the conditional formatting over and see how that works... And so on. I will do some more troubleshooting and post on a new string if I get new info. I appreciate all of the the help.
 
Upvote 0
Some of this data is proprietary so I do not think that I can do that directly,
Many people strip off the proprietary stuff, and just provide a stripped-down/dummied-up version of the workbook.
You can remove all the VBA code that does not pertain.

Just make sure that your stripped down version still exhibits the issue!
(If it does not, then you have something to work with! Just add the things back in, one at a time, and test it after each one, and see when it stops working like it is supposed to. That will pinpoint where the issue resides.)
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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