+ Reply to Thread
Results 1 to 8 of 8

Increment Number in random row?

  1. #1
    Registered User
    Join Date
    10-19-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    2023
    Posts
    16

    Increment Number in random row?

    Hello -

    I'm trying to figure out how to make excel increment a number in a random row (but in the same column), depending upon where I paste the word "Truck". The number would start with 1 and increment +1 every time it's pasted. This number is in the cell to the right of "Truck".
    THANKS for any help!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Increment Number in random row?

    If there are two Trucks in Column A.... what do you wan to see in column B?? Two 2s or a 1 at the first truck entered and a 2 at the second entered? ?...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    10-19-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    2023
    Posts
    16

    Re: Increment Number in random row?

    The first truck in column A would have a 1 next to it in column B, the second truck would have a 2 next to it, third truck 3.....etc. THANKS

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Increment Number in random row?

    =IF(A1="Truck",COUNTA($A$1:A1),"")

    is this it??
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-19-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    2023
    Posts
    16

    Re: Increment Number in random row?

    Awesome! you rock....THANKS!!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,891

    Re: Increment Number in random row?

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Registered User
    Join Date
    10-19-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    2023
    Posts
    16

    Re: Increment Number in random row?

    Oops sorry, didn't realize this made a difference, but there are other numbers & words in the same column as "truck" which this is counting... THANKS

  8. #8
    Registered User
    Join Date
    10-19-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    2023
    Posts
    16

    Re: Increment Number in random row?

    Nevermind...figured it out using COUNTIF.....=COUNTIF($J$1:J4,"Truck") THANK YOU!

+ 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] Random numbers but each number not eqully random.
    By richhhh in forum Excel General
    Replies: 11
    Last Post: 09-06-2016, 01:16 PM
  2. Search worksheet for certain text + number combo and then increment the number
    By hal9000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2013, 06:09 PM
  3. Replies: 5
    Last Post: 06-21-2013, 10:40 AM
  4. [SOLVED] Generate random 6-16-byte random hexadecimal number
    By jsamuelshn in forum Excel General
    Replies: 6
    Last Post: 07-20-2012, 10:38 AM
  5. Generating a Random Number of Random Numbers
    By Garrus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2010, 09:39 AM
  6. increment/random number problems
    By smackdog in forum Excel General
    Replies: 1
    Last Post: 02-06-2008, 09:17 AM
  7. How do I find random number in list of random alpha? (Position is.
    By jlahealth-partners in forum Excel General
    Replies: 0
    Last Post: 02-08-2005, 02:06 PM

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