ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to get last two rows?? (https://www.excelbanter.com/excel-worksheet-functions/86311-re-how-get-last-two-rows.html)

Bondi

how to get last two rows??
 
Hi,

There is proberly an easier way to do it but you can use CountIf() and
Ofsett(),
Asuming your data for May 2004 is en cell B3 this should give you the
pct change

=(OFFSET(B3,COUNTIF(B3:B6,"0")-1,0)-(OFFSET(B3,COUNTIF(B3:B6,"0")-2,0)))/(OFFSET(B3,COUNTIF(B3:B6,"0")-2,0))

The difference can be calculated with the same functions:

=(OFFSET(B3,COUNTIF(B3:B6,"0")-1,0))-(OFFSET(B3,COUNTIF(B3:B6,"0")-2,0))

Best regards
Bondi



All times are GMT +1. The time now is 11:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com