VBA Copy visible cells as a picture

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
929
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a macro that filters column Q removing blank cells. Once it is filtered to show only the cells with data I am looking for a code that will copy all visible cells from Q2 down and copy them as a picture.

Any idea what code I could use?

Thank you for all your help!

Carla
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Nevermind, I figured it out. Once my Data is filtered to remove blanks, I use the following code:

Code:
LastRowColumnQ = Cells(Rows.Count, 1).End(xlUp).Row
    Range("Q2:Q" & LastRowColumnQ).Select
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture

Hope this post helps someone out there :)
 
Upvote 0
Depending on your particular situation, you might be able to do this without any code at all. Before filtering, select and copy Q2:Q100 (or your maximum range). Right click the cell where you want the picture. Where it says "Paste Special" hover the mouse over the arrow on the right, then choose the bottom right icon (Linked Picture). It will automatically adapt as you filter your range. If you want a picture that doesn't change, select your range after it's filtered, copy it, then Paste Special with the Picture option (bottom row, second from right). If you still want VBA code, we can automate that process.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,148
Members
453,021
Latest member
Justyna P

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