Solved

Excel 2008 - Find last cell with data in row

Posted on 2011-09-13
10
356 Views
Last Modified: 2012-05-12
I've searched for an answer, but it seems that I can only find VBA-based solutions, which appears to no longer be an option in Excel 2008.  

I'm trying to return the name of the last cell in a row that contains data.  

So, it looks like this:

+===========================================================+
                 A      /  B  /  C  /  D  /  E  (columns)
+===========================================================+
1         || [Formula] /  3  /  4  /  5  / [blank]
2         || [Formula] /  7  /  8  / [blank] / [blank]
3         || [Formula] /  9  / 10 / 11 / 12
(rows)
+===========================================================+

Open in new window


 And, the end result would look like this:

+===========================================================+
               A       /  B  /  C  /  D  /  E  (columns)
+===========================================================+
1         || D1 /  3  /  4  /  5  / 
2         || C2 /  7  /  8  /     / 
3         || E3 /  9  / 10 / 11 / 12
(rows)
+===========================================================+

Open in new window

0
Comment
Question by:n00b0101
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 18

Expert Comment

by:krishnakrkc
ID: 36529711
Hi,

try

=index(b$1:e$1,match(9.99999e+307,b2:e2))

Kris
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36529737
Try this formula in A1 copied down

=ADDRESS(ROW(),MATCH(9.99E+307,1:1),4)

regards, barry
0
 
LVL 33

Expert Comment

by:Norie
ID: 36529739
Are you using a Mac?

There are formulas to get the last value in a row, for example

=LOOKUP(9.99E+99,2:2)

Put this in A1 in and be copy down.

I'm sure getting the address, eg D1, etc but that's a but beyond me.
0
 
LVL 18

Expert Comment

by:krishnakrkc
ID: 36529758
Hi

Ignore the earlier post. Try

=CELL("address",INDEX(C1:K1,MATCH(9.9999E+307,B1:K1)))

Kris
0
 

Author Comment

by:n00b0101
ID: 36529948
I've tried all of these, but it returns #N/A.  In some cases, the cell will contain text... I tried altering the MATCH statement to:

MAX(MATCH(9.9999E+307,B8:RJ8),MATCH(REPT("z",255),B8:RJ8))

Open in new window


But, it continues to return #N/A
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 18

Assisted Solution

by:krishnakrkc
krishnakrkc earned 200 total points
ID: 36530004
Hi,

=CELL("address",INDEX(C1:K1,MAX(IFERROR(MATCH(9.9999E+307,B1:K1),0),IFERROR(MATCH("zzzzzzzzz",B1:K1),0))))

Kris
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36530014
For text or numbers....

=ADDRESS(ROW(),MATCH(2,INDEX(1/(1:1<>""),0)),4)

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36530027
My version goes in A1, clearly for the range B8:RJ8 change to this in A8

=ADDRESS(ROW(),MATCH(2,INDEX(1/(B8:RJ8<>""),0)),4)

barry
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 300 total points
ID: 36530076
Sorry, scratch that last one, for that version to work the range should start at column A. Perhaps an amalgamation of the formula suggested by Kris....and my one, i.e. in A8

=CELL("address",INDEX(B8:IV8,MATCH(2,INDEX(1/(B8:IV8<>""),0))))

regards, barry
0
 

Author Closing Comment

by:n00b0101
ID: 36530243
Thanks, this one works.  I'm splitting the points (hopefully, fairly)...
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Query Missing Money orders... 6 72
excel file 5 52
From where do I download MySQL for Excel? 2 13
Rearrange Macro 7 25
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now