Update offset Print Area

Livin404

Well-known Member
Joined
Jan 7, 2019
Messages
743
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
When I created a print area in my Name Manager I had to Offset it so It will select all the areas that will have text. Because I have a format where rows alternate colors it is selecting all the rows.
I only want it to select the rows with Text.

The formula I'm using in Name manager is
Excel Formula:
=OFFSET('Training Criteria'!$A$4,0,0,COUNTA('Training Criteria'!$I:$I),9)

I only one it to go down to Tanner Damari A...

Here is what the image currently is and it goes on for 86 pages.

Names & Numbers are fictional

Thank you,

name range.JPG
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I have some good news I got it a lot closer. It is capturing everything I need except the last row. It is only going down to Reilly Alvaro H.
The updated formula is
Excel Formula:
=OFFSET('Training Criteria'!$A$4,0,0,COUNT('Training Criteria'!$I:$I),9)

The new image is
name range.JPG
 
Upvote 0
The COUNT part of your formula counts the numeric values in column I, the Phone Numbers. You have 4 numbers, and one text heading. And since you're starting at the heading (A4), you only get 4 lines 4,5,6,7. If you want to get the last line, then either add 1 to the COUNT

=OFFSET('Training Criteria'!$A$4,0,0,COUNT('Training Criteria'!$I:$I)+1,9)

or use COUNTA instead, which counts all non-blank cells.

=OFFSET('Training Criteria'!$A$4,0,0,COUNTA('Training Criteria'!$I:$I),9)

The reason your formula didn't work the first time is probably because you had some non-empty cells below your data. The way your formula is written, make sure there is no data in rows 1,2,3 or after your table.
 
Upvote 0
Solution
Thank you, I went with your first solution. Though I tried your second one which looked like my original one, and it was still capturing all those line underneath the last row. I don't know why; it works for years.
The first solution it appears to be working, so again thanks!
 
Upvote 0

Forum statistics

Threads
1,215,080
Messages
6,123,013
Members
449,093
Latest member
ikke

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