+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    07-18-2009
    Location
    MODESTO,USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Column cells enumerating

    I need to enumerate the cells in a column with consecutive numbers, that is: 1,2,3, etc. The range involves blank cells. In short, when "g1" is active, "e1" equals "1"; when "g2" is active,
    "e2" equals "2"; and so on; then when column "g" happens to be inactive, column "e" becomes empty. So forth so good.

    Up to this stage this is my formula:
    =if(g54>"",sum(e53+1),"")


    i didn't realized that i was going to get empty cells. So my formula has limitations. Thus i need a formula that enumerates the cells in column "e" depending on the status of column "g" in such a way that when a cell in column "g" happens to be inactive, and consequently column "e" becomes empty, the formula reads and sums the value in the last active cell in column "e" to the cell right after the same empty cell in column "e" so the serie follows a logical secuence.

    Any help will be greatly appreciated.
    Last edited by CESAR V. ARROYO; 07-19-2009 at 04:59 PM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Column cells enumerating

    In E1:
    =IF(G1 = "", "", 1)

    In E2 and then copied down:
    =IF(G2 = "", "", MAX($E$1:$E1)+1)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Forum Guru mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    2,814

    Re: Column cells enumerating

    Try pasting this formula into E1 and copy down.

    =IF(G1="","",COUNTA(G$1:G1))
    Martin

    Eighty Twenty Spreadsheet Automation http://homepage.ntlworld.com/martin.rice1/ for all your Excel customisation and consulting needs.

    If my solution has saved you time and/or money, please consider donating to Cancer Research UK.

  4. #4
    Registered User
    Join Date
    07-18-2009
    Location
    MODESTO,USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Cool Re: Column cells enumerating

    Quote Originally Posted by jbeaucaire View Post
    in e1:
    =if(g1 = "", "", 1)

    in e2 and then copied down:
    =if(g2 = "", "", max($e$1:$e1)+1)
    thank you jb, it really works as i need it to. I'll catch you later.

  5. #5
    Registered User
    Join Date
    07-18-2009
    Location
    MODESTO,USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Cool Re: Column cells enumerating

    Quote Originally Posted by mrice View Post
    try pasting this formula into e1 and copy down.

    =if(g1="","",counta(g$1:g1))
    thank you martin, it does the job. I really appreciate your help. Talk to you soon.

  6. #6
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Column cells enumerating

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0