+ Reply to Thread
Results 1 to 3 of 3

Change numbers if string changes

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Post Change numbers if string changes

    hi,
    i want to change numbers if string change of column b
    for example
    b1 = a then a1 = 1
    b2 = a then a2 = 1
    b3 = b then a3 = 2
    b4 = b then a4 = 2
    b5 = b then a5 = 2
    b6 = b then a6 = 2
    b7 = c then a7 = 3
    b8 = d then a8 = 4
    b9 = d then a9 = 4
    b10 = d then a10 = 4

    thank you
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  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 2406
    Posts
    44,662

    Re: Change numbers if string changes

    With data starting in ROW 2:

    =IF(B2="","",IF(B2=B1,A1,A1+1))
    Attached Files Attached Files
    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

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Change numbers if string changes

    Try this
    Enter formula in A1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 1 a
    2 1 a
    3 2 b
    4 2 b
    5 3 c
    6 4 d
    7 4 d
    8 4 d
    9 5 s
    10 6 q
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] Count the numbers within a string of numbers in a single cell
    By gra0001 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-26-2016, 05:08 AM
  2. [SOLVED] Macro to change 1) part of string, 2) the order of characters inside a string, 3) format
    By Karl Gustaf Karsten in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2015, 11:51 AM
  3. [SOLVED] Count numbers between two values in a coma delimited string of numbers
    By van23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 11:42 PM
  4. [SOLVED] Remove numbers from alphanumeric string. No standard format to the string.
    By ricunger in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2012, 01:43 PM
  5. Replies: 2
    Last Post: 08-23-2012, 04:58 PM
  6. Formula to change numbers to a string of text.
    By erinwithane in forum Excel General
    Replies: 1
    Last Post: 12-28-2010, 05:11 PM
  7. Converting String numbers into real numbers:formula in VBA
    By Werner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2005, 04:41 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