Dynamic Named Range - not standard


Well-known Member
Jun 9, 2009

I have seen several examples where OFFSET or COUNTA are used to find last cell containing either a text OR a numeric value

I want it to find ANY value. As the users may cut my sheet up in all sorts of ways.

Most use MATCH("*" for text or MATCH(1E+306 for numeric

I can't use COUNTA as the user may leave gaps.

Would like a dyanmic INDEX or method to find the last cell that is not blank ? (and using "<>""" only works for text, wont detect numbers!)

Help appreciated

ALSO...what are the codes to represent a very large number in excel 9E+ or something? Seen people using them in MAX and MIN functions to find largest and smallest items? Also use 255 and Z code mixes for matching


Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.


Board Regular
Jul 20, 2010
Try using


The large number formula looks like 1E+100 (a 1 with 100 hundred zeros - change to suit your needs).


Well-known Member
Jun 9, 2009
I tried this before coming on MrExcel. Doesn't work as does not count blank cells. Only counts cells with value. So if there are gaps, the range doesnt include all cells.

There may be gaps and so I was thinking more along lines or ROW() within an index match, or some other elegant solution

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...