Results 1 to 4 of 4

Thread: Help with getting an answer on finding the count of range.

  1. #1

    Help with getting an answer on finding the count of range.



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have the following information:
    Start number page in stack (Col. B)
    End Number page in stack (Col. A)
    I need to know the exact number of pages (Col. C)

    Col.A Col. B Col.C

    Column C also needs to total at the bottom of my sheet and the I need to have the formula populated in the sheet. This is keeping me from doing something as simple as A-B+1. Because if i do it will populate 1 in all of the yet unused Column C cells thus screwing my subtotal up. how can I get around this or is there a formula that would give me a real total with out adding the 1?

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,294
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Hi there, and welcome to the forum!

    Try this (row 2)

    =IF(AND(A2>0,B2>0),A2-B2+1,0)

    Copy that down column C and you should only have numbers in rows that actually have page number data. You can then total it using a SUM formula and you should be good to go.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3

    Thank you!

    Thank you!
    Thank you!
    Thank you!

    I knew there had to be a quick way to do but I could not remember or think of it. I really appreciate the help.

  4. #4
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,294
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Not a problem, glad it worked for you.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •