+ Reply to Thread
Results 1 to 3 of 3

Row ID generation

  1. #1
    Mikus
    Guest

    Row ID generation

    I want to create macro that would Enter ID number in column A if value is
    entered in column B. For example i have following

    How do i execution of code if any value is entered in certain column' cell ?
    For example i want to enter value in column A if ANY value is entered in
    column B

    Example:
    A B C
    1 1 aaa
    2 2 bbb
    3

    I want to create code that would enter next number in column A if i enter
    any value in column B.
    Value A2+1 should be entered in cell B3 if i enter value "s" in cell B3.
    Like this

    A B C
    1 1 aaa
    2 2 bbb
    3 3 s

  2. #2
    Gary's Student
    Guest

    RE: Row ID generation

    You need two different codes.
    Formula for cell A1
    Another formula for all the other cells in column A

    in A1 put =IF(B1="","",1)
    in A2 put =IF(B2="","",A1+1)

    Then copy A2 all the way down
    --
    Gary's Student


    "Mikus" wrote:

    > I want to create macro that would Enter ID number in column A if value is
    > entered in column B. For example i have following
    >
    > How do i execution of code if any value is entered in certain column' cell ?
    > For example i want to enter value in column A if ANY value is entered in
    > column B
    >
    > Example:
    > A B C
    > 1 1 aaa
    > 2 2 bbb
    > 3
    >
    > I want to create code that would enter next number in column A if i enter
    > any value in column B.
    > Value A2+1 should be entered in cell B3 if i enter value "s" in cell B3.
    > Like this
    >
    > A B C
    > 1 1 aaa
    > 2 2 bbb
    > 3 3 s


  3. #3
    Mikus
    Guest

    RE: Row ID generation

    Thanks garry ... i can't understand why i did not come up with this myself

    I think i will use ISBLANK(B1) instead of B1="" though

    "Gary's Student" wrote:

    > You need two different codes.
    > Formula for cell A1
    > Another formula for all the other cells in column A
    >
    > in A1 put =IF(B1="","",1)
    > in A2 put =IF(B2="","",A1+1)
    >
    > Then copy A2 all the way down
    > --
    > Gary's Student
    >
    >
    > "Mikus" wrote:
    >
    > > I want to create macro that would Enter ID number in column A if value is
    > > entered in column B. For example i have following
    > >
    > > How do i execution of code if any value is entered in certain column' cell ?
    > > For example i want to enter value in column A if ANY value is entered in
    > > column B
    > >
    > > Example:
    > > A B C
    > > 1 1 aaa
    > > 2 2 bbb
    > > 3
    > >
    > > I want to create code that would enter next number in column A if i enter
    > > any value in column B.
    > > Value A2+1 should be entered in cell B3 if i enter value "s" in cell B3.
    > > Like this
    > >
    > > A B C
    > > 1 1 aaa
    > > 2 2 bbb
    > > 3 3 s


+ 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