DigDeep Posted May 7, 2017 Share Posted May 7, 2017 I want to get the result in the form of (total rows - Header) Using the below code, I can get the total rows which is including the header. How can I use '-1' in Excel? Local $Lines = $oWorkbook.ActiveSheet.UsedRange.Rows.Count MsgBox(0, '', $Lines) Eg: if the $Lines = 4 ; Total rows The result should be 4 - Row1 = 3 Link to comment Share on other sites More sharing options...
kylomas Posted May 7, 2017 Share Posted May 7, 2017 DigDeep, See this... kylomas DigDeep 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
DigDeep Posted May 7, 2017 Author Share Posted May 7, 2017 Thanks @kylomas I just tried as per below and it showed up correctly. Local $Lines = $oWorkbook.ActiveSheet.UsedRange.Rows.Count MsgBox(0, '', $Lines - 1) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now