+ Reply to Thread
Results 1 to 5 of 5

Find the first instance of "1" in a column and then start numbering in another column

  1. #1
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Find the first instance of "1" in a column and then start numbering in another column

    I need a formula that looks in a column of data for a "1" and when it finds it, starts numbering from 1 to a specified number in a different column (and stops numbering at the max limit).

    So, in column A1 - A10, cell A3 content is 1 (all other cells in that column are empty). My range is 1 - 5.

    The formula in column B1 - B10 would look for a 1 in column A1 - A10 and start numbering from 1 - 5 when it finds it. Like so:

    A1 = "" B1 = ""
    A2 = "" B2 = ""
    A3 = 1 B3 = 1
    A4 = "" B4 = 2
    A5 = "" B5 = 3
    A6 = "" B6 = 4
    A7 = "" B7 = 5
    A8 = "" B8 = ""
    A9 = "" B9 = ""
    A10 = "" B10 = ""

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find the first instance of "1" in a column and then start numbering in another column

    Is your range always 1 - 5? Is there a set number of columns or will it be dynamic? Is is always rows 1 - 10 only?

    Edit: A guess

    Please Login or Register  to view this content.
    Last edited by stnkynts; 07-22-2013 at 06:27 PM.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Find the first instance of "1" in a column and then start numbering in another column

    something like this? enter value in c2
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Re: Find the first instance of "1" in a column and then start numbering in another column

    Quote Originally Posted by martindwilson View Post
    something like this? enter value in c2
    Absolutely perfect! Thanks!

  5. #5
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Re: Find the first instance of "1" in a column and then start numbering in another column

    Quote Originally Posted by stnkynts View Post
    Is your range always 1 - 5? Is there a set number of columns or will it be dynamic? Is is always rows 1 - 10 only?

    Edit: A guess

    Please Login or Register  to view this content.
    I wasn't really looking for VBA code but I'll save this for the future! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  2. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  3. [SOLVED] VBA Search to find value in "O" column under the condition that "S" column is blank
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2012, 10:15 AM
  4. Help on numbering column "A" in a worksheek. 1 through whatever column B ends
    By webuxer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2011, 08:04 PM
  5. Replies: 11
    Last Post: 04-02-2009, 09:01 AM

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