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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Watch MrExcel Video

Forum statistics

Threads
1,127,518
Messages
5,625,271
Members
416,086
Latest member
CaptainGD

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