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>
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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