• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Is there a better solution to what I did with INDEX

bines53

Active Member
Hello Friends,

I built a replacement OFFSET function with INDEX.
Question, the solution seems cumbersome, is there another solution?

Thank you !
 

Attachments

  • test.789789.xlsx
    13.5 KB · Views: 11
Hi Bines,

Both the formula i.e. OFFSET and INDEX are making dynamic range for SUM function. What is there that you are finding cumbersome?

2nd if you can explain the purpose behind you formula than may be some reader can propose you an alternate one.

Regards,
 
Hi Somendra ,

Thought possible ROW NUM IN function INDEX will get a minus (-$K$1) without using the function ROWS .

Thank you !
 
Hi Somendra ,

For example, take the formula in cell G3, I want to summarize 246 lines, the last line is in cell B253 and the first line is 245 over cell B253, in this case the first cell is a cell B8.

Regards,

David
 
@bines53

You say the last line is in cell B253, but the last line in column B is 259 and column A is 256, can you clarify that?

Why are you saying the last line is B253?

Regards,
 
Hi Somendra ,

G3=SUM(INDEX($B$1:B253,ROWS($B$1:B253)-$K$1):B253)
G4=SUM(INDEX($B$1:B254,ROWS($B$1:B254)-$K$1):B254)

column A,Should not be treated

Regards,
 
Hi Bines,

It's may be my fault to make myself clear to you, What I want to ask is why you selected B253 as last line in your G3 formula? Why you started that as your starting point?

Regards,
 
Hi Somendra ,

I check all kinds of relationships in my data, I have to check them in some ranges.

Regards,

David
 
Hello David -

I think the oddness in your formulas arises because you count all the way to the end, and then backwards again. Wouldn't it be better just to count forwards?

I attach an alternative that does just that. Note that I created some named formulas, including one for the total number of records in your dataset: I didn't use this in the end, but you could use it if for some reason you need to keep the "forwards-backwards" approach.

- juanito
 

Attachments

  • Copy of test.789789.xlsx
    15.9 KB · Views: 2
Back
Top