Solved

Excel/Index formulas

Posted on 2013-06-18
7
169 Views
Last Modified: 2013-06-24
If I set up an index formula where i have to specify the bottom row, how can I automatically extend that as rows are added?
0
Comment
Question by:Feisty472
  • 3
  • 2
  • 2
7 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39258075
If there are no gaps in the data then you can do a count of data.
0
 
LVL 50

Accepted Solution

by:
teylyn earned 200 total points
ID: 39258229
Hello,

you can use a match function to find the last populated cell in a column. If the data is text,

=MATCH("zzzz",A:A,1)

if the data is numeric,

=MATCH(99^99,A:A,1)

This can be plugged into the Index function:

=$A$1:Index($A:$A,MATCH(99^99,$A:$A,1))

You can also define a named formula with the match function. Create a name called LastRow with the formula

=MATCH(99^99,$A:$A,1)

and then use

=$A$1:Index($A:$A,LastRow)

cheers, teylyn
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39258271
Hi teylyn

I never knew that something like

=$A$1:Index($A:$A,LastRow)

works. Thanks for this.

Saqib
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 50

Expert Comment

by:teylyn
ID: 39258365
Hi Saqib, welcome to the power of named formulas! The beauty is that it is calculated once, but you can use it in many different formulas and don't have to repeat the match() in each one.
0
 

Author Comment

by:Feisty472
ID: 39259922
Saqib,

You can practice this new found information by re-writing the formula's you wrote for me over the weekend using this function!!  Will you do that?
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39260189
Which formula are you talking about?
0
 

Author Comment

by:Feisty472
ID: 39260917
I thought you gave up on me.  I sent you the below on Sunday.  You never responded.  So, I had to reach out to others.  (I like to deal with one person per spreadsheet so that I don't have to keep explaining the situation and re-uploading files.)  Below are my comments from earlier in the week.

YOUR COMMENT
by: Feisty472Posted on 2013-06-16 at 14:30:27ID: 39251856

That actually worked great.  I forgot to tell you one other piece of criteria. (Sorry.)

The actual formula is:
=IF(INDEX('6.14 All VDOTs'!$Z$2:$Z$352,MATCH(MAX(IF('6.14 All VDOTs'!$E$2:$E$352=G29,'6.14 All VDOTs'!$Y$2:$Y$352)),IF('6.14 All VDOTs'!$E$2:$E$352=G29,IF('6.14 All VDOTs'!$Y$2:$Y$352=1,MAX(IF('6.14 All VDOTs'!$E$2:$E$352=G29,'6.14 All VDOTs'!$Y$2:$Y$352)),'6.14 All VDOTs'!$Y$2:$Y$352)),0))=0,"In Flight",INDEX('6.14 All VDOTs'!$Z$2:$Z$352,MATCH(MAX(IF('6.14 All VDOTs'!$E$2:$E$352=G29,'6.14 All VDOTs'!$Y$2:$Y$352)),IF('6.14 All VDOTs'!$E$2:$E$352=G29,IF('6.14 All VDOTs'!$Y$2:$Y$352=1,MAX(IF('6.14 All VDOTs'!$E$2:$E$352=G29,'6.14 All VDOTs'!$Y$2:$Y$352)),'6.14 All VDOTs'!$Y$2:$Y$352)),0)))

Please revise it to add the criteria that:  If column Z=Dispute, the return the value in column T.

BTW: can you write in simply terms exactly what is going on in the formula?  I would love to understand it a bit more in case I have to make slight revisions as time goes by.

Finally, as the rows increase in the spreadsheet, is there an easy way to extend the range without having to manually increase 352?  [6/19 - I think the "Last Row" name trick you learned earlier would work here if you include it in the revised formulas.]

Thank again for all of your help!!
Accept Multiple Solutions
Accept as Solution
YOUR COMMENT
by: Feisty472Posted on 2013-06-16 at 19:42:37ID: 39252112

HUGE PROBLEM!

After I added and proofed the formula you created, everything was peachy on the "Selected VDOTs" tab.  So, I was wrapping up work and decided to view all the other tabs.  In doing so, I noticed that any cell that references column M from the All VDOTs tab now show "REF".  Well,  the old column where I manually keyed the Status in was column M.  Knowing that the reference got deleted when I deleted the old manual column, I simply went back into the formula and 're-referenced' column M that now has the formulas.  Rather than 'REF' displaying, '#N/A' now displays.

I spent over an hour trying to figure this out. My eyes are now crossed.  It's probably something simple for you.  But, I can't get the numbers to re-appear.

Will using the INDIRECT function help if I have to refresh the All VDOTs tab weekly?  Each week, I have to copy in a new All VDOTs tab and recalculate.  I thought of turning 'Calculate" to "manual" when I copy in the new tab each week.  But, I look to you for advice.  (I can't have this issue weekly.)

My actual file is attached...
Key-Control-Tracker-061613-v3.xls
0

Featured Post

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

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

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