Selecting Content of Varying Sizes of Ranges Leaving out Blank Cells

curtdawg

New Member
Joined
Jul 10, 2012
Messages
3
I have a Range of Cells that I would like to transfer to PowerPoint using VBA Macro. The problem is that some of the cells are emty at times and I want to leave them out of the final range that is moved to PPT.

I'm thinking that I have to select the largest possible range and then do some type of 'V' Look-Up and IF/THEN in the code but do not know how.

Any Ideas?


Example of My Thoughts/Logic

1. Look at Range A1:F20
2. If Cells in Column A have contents, Then put all of Row to Column F in an additional table that would be only filled cells


Please help :) !!!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You can record a macro to do most of this.

  • Start macro recording
  • Select A1:F20
  • Select from the menu Data\ Filter\ Autofilter
  • This will put a dropdown list in row 1 for each column
  • Select from the A1 dropdown list "NonBlanks"
  • This will hide all the rows with blanks in column A
  • Copy the visible data and paste to PowerPoint
  • Stop macro recording

The macro recorder will record all those steps except for the pasting to PowerPoint. If you have issues or want additional help from there, post your recorded macro and ask a specific question. You may decide that a macro is not really needed as it is only a few steps to do it manually.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,684
Members
449,116
Latest member
HypnoFant

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