VBA to dynamically select the next range of used cells?

ajjava

Board Regular
Joined
Dec 11, 2018
Messages
57
Office Version
  1. 365
Platform
  1. Windows
I have a worksheet that contains several ranges of contiguous, non-blank cells (they look like tables but are not technically defined as such).

I need some code that will select the range of contiguous cells, copy it, then paste as a picture.
Then it needs to proceed to the next range contiguous cells, copy, paste as a picture, etc. etc.

This data is getting into Excel via an export from Business Objects.

The number of table-like structures can vary from sheet to sheet, and there are multiple sheets. I'd want the code to loop through all table-like structures and through all sheets.

Can anybody suggest the correct code? From the research I've done, I'm thinking of employing the SpecialCells method...am I barking up the right tree?

jK8sFaL.jpg
[/URL]https://i.imgur.com/jK8sFaL.jpg[/img][/IMG]
 
Last edited:
Oh, my bad. I was in the process of testing the excellent solutions I've received. I will remember this rule in the future.
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
igold
I really appreciate your efforts with this. I'm still getting weird results and can't pinpoint why. But no further efforts are necessary here, as I think I may have a solution that accomplishes my goal. Thank you again :)
 
Last edited:
Upvote 0
That's great, I am glad you got what you needed. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

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