Macro not working

Jyggalag

Active Member
Joined
Mar 8, 2021
Messages
422
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi all,

I have this macro that i recorded, and it produced this code:

1651746132384.png


However, when I use it, it just erases everything in column E and does not paste the data from column F at all!

please help me fix it`??

this is my setup, with the macro being called "update", as you can see, my cells are all blank in column E :(

1651746213409.png
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Do you get any error messages?
Also do you have any merged cells?
And is the sheet protected?
 
Upvote 0
Do you get any error messages?
Also do you have any merged cells?
And is the sheet protected?
Hi Fluff,

Thank you!

No error messages.

I do have a filter that I often put on however for the columns, so it "hides" row 2-350, but it should still work, no?

the sheet is not protected

and I do not have any merged cells in the two columns
 
Upvote 0
U
Do you get any error messages?
Also do you have any merged cells?
And is the sheet protected?
UPDATE:
When I use the macro without having a filter on it works.

However, when I filter so rows 2-350 are hidden, it (for some unknown reason) just removes all the text in column E?

Any idea why?
 
Upvote 0
Do you have any event code on that sheet?
 
Upvote 0
In that case I have no idea why that is happening.
 
Upvote 0
Change of plan, you are just copying the visible cells, rather than the entire column. You will need to remove the filter.
 
Upvote 0
Change of plan, you are just copying the visible cells, rather than the entire column. You will need to remove the filter.
Hi Fluff,

Is it possible to do it, while the filter is still there? Or no?

I tried removing the filter, creating the macro again (it works) and then putting on a filter, filtering so rows 2-400 are hidden, and then using the macro again.

However, this results in the columns values all going blank due to the filter apparently

very silly, you cannot work around this in any way?
 
Upvote 0
When you have hidden rows the copy will only copy the visible cells, but will paste those values in the other column starting in E1 regardless of whether the row is hidden or not.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

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