+ Reply to Thread
Results 1 to 9 of 9

formula to add amend a number/text

  1. #1
    Forum Contributor
    Join Date
    11-10-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    229

    formula to add amend a number/text

    Hi all,

    Please see the attached photo and file , you see the colum D ( from D3116)
    I need to make the following cells as follow : from cell D3116 the content has to chage from P0997 it has to become P0998, and the next cell D3117 has to become P0997, and so on,
    basically from D3116 the naming in that cell has to start to increase. But not being a number, i'm not sure how to do this

    many thanks!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: formula to add amend a number/text

    1. your references dont match your file? (you probably deleted a bunch of rows for your sample, but did not adjust the ranges in your question?)

    2. you could probably do this with Find/Replace. A formula will not do this for you (directly), you will need to use helper columns, then copy/paste values back over the original data
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: formula to add amend a number/text

    d6 ="P"&TEXT(1004-ROW(),"0000") and drag down.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: formula to add amend a number/text

    What is the underlying formula?

    Values decrease by 1 as you move down the column skipping when column B is blank(?).

    Row 16 (D16) has this "P0989 RW" - how is this handled?

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: formula to add amend a number/text

    @oeldere,
    Your solution doesn't account for blank entries. See my post.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: formula to add amend a number/text

    @oeldere,
    Your solution doesn't account for blank entries. See my post.
    The OP has to answer, if that is a issue (or not).

    As often a more detailed example with the expected results is very usefull for getting the best anwer.

  7. #7
    Forum Contributor
    Join Date
    11-10-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: formula to add amend a number/text

    Quote Originally Posted by oeldere View Post
    d6 ="P"&TEXT(1004-ROW(),"0000") and drag down.
    Quote Originally Posted by JohnTopley View Post
    What is the underlying formula?

    Values decrease by 1 as you move down the column skipping when column B is blank(?).

    Row 16 (D16) has this "P0989 RW" - how is this handled?
    in fact the formula doesn't take into account of the RW cells.... sorry but so far the issue it hasn't been solved

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: formula to add amend a number/text

    What about the blank entries?

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: formula to add amend a number/text

    Post an small excel file, and add in that file the expected results.

+ 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. Enhancement to Open And Amend Text Files Using VBA
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-14-2015, 10:14 AM
  2. [SOLVED] List, Open and Amend Text files using VBA
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-08-2015, 01:00 PM
  3. Trying to create a function to amend text in a string
    By Sophie.Durrant in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-14-2014, 10:35 AM
  4. [SOLVED] Code Amend: Tidy Up andDelete All Rows Where Cell Value Is Number
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2014, 01:50 PM
  5. [SOLVED] Extract text from a string of text (amend formula to include new criteria)
    By robertguy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2013, 04:53 PM
  6. Amend the +1 function to incorporate text???
    By ravihotwok in forum Excel General
    Replies: 8
    Last Post: 10-21-2008, 08:25 AM
  7. Amend code to Sort Sheets by number
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-02-2008, 09:03 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