Solved

more efficient formula

Posted on 2013-06-16
5
241 Views
Last Modified: 2013-07-11
i am import data from various workbook i am using the formula to determine what row to start on the worksheet i would eventually like to apply it to a name range.I am looking for the most efficient way Thanks
=IF(ROW(LASTROW)>ROW(START_ROW),ADDRESS(ROW(LASTROW)+1,1),IF(ROW(START_PASS)=2,ADDRESS(ROW(START_PASS)-1,1),ADDRESS(ROW(START_PASS),1)))
0
Comment
Question by:Svgmassive
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:gowflow
ID: 39251452
Sorry is this VBA or it is a formula ?
if it is a formula then presume all of
LastRow
Start_Row
Start_Pass
are named ranges ??
can you post a sample workbook ? as cannot see how you LastRow get updated when you add data !!!

gowflow
0
 

Author Comment

by:Svgmassive
ID: 39251469
it's not vba,yes they are name ranges
0
 
LVL 30

Expert Comment

by:gowflow
ID: 39251561
can you post a workbook ?
gowflow
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39251729
Unless your name is barryhoudini, I have generally found that any formula using ADDRESS is taking a roundabout way of solving the problem.

The INDEX function returns a range reference, and would be a better approach for your named range:
=INDEX($A:$A,IF(ROW(LASTROW)>ROW(START_ROW),ROW(LASTROW)+1,IF(ROW(START_PASS)=2,1,ROW(START_PASS))))

It may be that the formula can be further simplified if we could see your sample workbook and the logic for LASTROW, START_ROW and START_PASS.
0
 

Author Comment

by:Svgmassive
ID: 39255672
point taken.looking at the workbook I think a simpler  approach would be to return the address of the last row text or numeric since the  data is mixed
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

717 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