VBA Copy visible cells as a picture

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
888
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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,214,983
Messages
6,122,582
Members
449,089
Latest member
Motoracer88

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