+ Reply to Thread
Results 1 to 10 of 10

Counted column without loop

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Counted column without loop

    Is there a way to create a "counted" column, let's say 0-200 without using a loop? I want column A to have numbers from 0-200.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Counted column without loop

    One way:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Counted column without loop

    I'd kinda consider that a loop, but nevermind, it works. Thanks!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Counted column without loop

    Why would you consider it a loop? It doesn't have a counter, it doesn't have any loop code: No "For ... Next", "For Each", "Do While" ..., whatever.

  5. #5
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Counted column without loop

    hmm.. well, i guess your right

  6. #6
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Counted column without loop

    oops, i was i bit quick to judge the code as complete.. When using the code i get:

    Please Login or Register  to view this content.
    any suggestions?

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Counted column without loop

    any suggestions?
    No, worked fine for me on an empty sheet. Please post a sample workbook that exhibits the problem.

    All it does is put a seed value, 0, in cell A1 and a formula to increment the value by 1 in cells A2:A201. It immediately converts the calculated formulae to values.

    Interesting effect though ... I'd like to understand why it's doing that.

    Regards, TMS

  8. #8
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Counted column without loop

    Very weird.. works on an empty sheet for my aswell.. Afraid i can't post my original document, so i cant reproduce the problem for you. I solved the issue by using some ugly code:

    Please Login or Register  to view this content.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Counted column without loop

    Clearly, your real life scenario is subtly different to the question you originally asked.
    Last edited by TMS; 06-18-2013 at 02:08 PM.

  10. #10
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Counted column without loop

    Well actually not.. Making it even more strange

+ Reply to Thread

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.6.0 RC 1