How to select only cells wtih data

mbesspiata

Board Regular
Joined
Aug 28, 2009
Messages
100
I run a pivot table to extract data from a report and break it out into pending days of 30 day periods. I then select the 4 cells from 1 to over 90 days to copy and paste into another report. The problem I have is some of my reports don't have data in all the 30 day ranges and my selection of the 4 cells then brings in my total cell and a blank cell if only 2 ranges are used: see below for example. The letters are the column letters. My macro selects j4-m4 where if all the ranges were used would not include the total cell or a blank cell.
The bottom line on the example is what would be included if all ranges were filled. How can I write something to limit my selection to only the cells in the 1-30, 31-60, 61-90, and >90 IF THEY HAVE DATA IN THEM?

Mike

I</SPAN>J</SPAN>K</SPAN>L</SPAN>M</SPAN>N</SPAN>
Count of Seizure Number</SPAN>DYSOLD</SPAN>
STAT</SPAN>1-30</SPAN>31-60</SPAN>Grand Total</SPAN>
80100</SPAN>78</SPAN>23</SPAN>101</SPAN>
Grand Total</SPAN>78</SPAN>23</SPAN>101</SPAN>
61-90</SPAN>>91</SPAN>TOTAL</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL span=2><COL><COL span=2></COLGROUP>
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,316
Members
414,053
Latest member
Dual Showman

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
Top