Obtaining blanks

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,304
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Using

=OFFSET(tblReports!$G$2,0,0,COUNTA(tblReports!G:G))

I create a dynamic range of data called "Reports" in sheet "tblReports". However when I select a cell on another sheet called "Main", and do a Data Validation on a cell and select List and make the Source =Reports, I still get blanks appearring in the drop down! What can I be doing wrong?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi Azizrasul,

If you're referring to it in another sheet then make sure the scope is Workbook

1627158398750.png
 
Upvote 0
When I go into Name Manager and select Reports, it highlights the empty rows after the last populated cell. In column A in the same sheet the column is populated by 32 rows and Reports also highlights 32 rows of which most are empty.

I would not have thought that column A having more populated cells would make a difference?
 
Upvote 0
I suspect you had a cell in column A selected when you went into Name Manager and it changed your relative address of G:G so try changing that to
Excel Formula:
=OFFSET(tblReports!$G$2,0,0,COUNTA(tblReports!$G:$G))

1627171625504.png
 
Upvote 0
I have tried that and it kinda works except that I always get 1 blank line. Also the data changes based on a value I select on another data valaidation drop box. I have selected the last row and Cleared contents, but the I still get 1 blank line?
 
Upvote 0
Try:
=OFFSET(tblReports!$G$2,0,0,COUNTA(tblReports!$G:$G)-1)
 
Upvote 0
I have tried that and it kinda works except that I always get 1 blank line. Also the data changes based on a value I select on another data valaidation drop box. I have selected the last row and Cleared contents, but the I still get 1 blank line?
You're using tblReports!$G:$G for the COUNTA but should start at $G$2 because of the heading. I don't understand the rest of what you're saying so try positing using XL2BB.
 
Upvote 0
You're using tblReports!$G:$G for the COUNTA but should start at $G$2 because of the heading. I don't understand the rest of what you're saying so try positing using XL2BB.

Please see image file.
 

Attachments

  • Untitled.png
    Untitled.png
    144.1 KB · Views: 8
Upvote 0
You need to subtract 1 from the counta because you have a header in G1
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,172
Members
449,071
Latest member
cdnMech

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