+ Reply to Thread
Results 1 to 17 of 17

how to find and replace the following....

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    3

    how to find and replace the following....

    Hi all, i'm having trouble replacing a number in an excel sheet.
    xcopy "C:\change-computer-description.vbs" "\\GSLAB-01\c$\DEPLOY\" /y
    xcopy "C:\change-computer-description.vbs" "\\GSLAB-01\c$\DEPLOY\" /y
    xcopy "C:\change-computer-description.vbs" "\\GSLAB-01\c$\DEPLOY\" /y

    I just want to change gslab-01 to go from gslab-01 to gslab-60.. every row fits in once cell which i expanded. i don't know if i am making myself clear.... thanks everyone.

    i started this thread and since i dont know much about excel, can some one explain how to fix the original post?
    thanks
    Last edited by nachumama; 08-01-2012 at 12:13 PM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078

    Re: how to find and replace the following....

    Just use Ctrl-F to find/replace
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: how to find and replace the following....

    or try the REPLACE or SUBSTITUTE functions perhaps
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: how to find and replace the following....

    I am trying to figure this out and am stuck. Say the text to be replaced is entered in A1 and is entered as "GSLAB-01", then use this function: =REPLACE(A1,8,2,2).

    The bolded part of the function, the new_text field, what function do you enter into there to make it perform "+1". If I could figure that part out, then it is just a matter of copying the formula down.
    B.Econ, CFA

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: how to find and replace the following....

    try in A1 and drag below
    =REPLACE(A1,8,2,ROW())

  6. #6
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: how to find and replace the following....

    Ok, got it but still not perfect.

    For rows 1 to 9 enter: =REPLACE(A1,8,2,ROW()+1) and drag down.
    For rows 10 and above enter: =REPLACE(A9,7,2,ROW()+1) and drag down.

    Not sure why it is adding an extra digit if I am starting the check at the 8th character for rows with more than 2 digits (i.e starting at row 10 and above).

    This will work assuming your text is entered as "GSLAB-xx"

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: how to find and replace the following....

    Alternatively the consistent formula ..as long the text is "GSLAB-xx"

    =REPLACE(A1,7,2,RIGHT(0&ROW()+1,2))

  8. #8
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: how to find and replace the following....

    What does "0&" do before the ROW() function? I understand the rest of it, find the 2 characters starting from the right of the string.

    Cheers for the lesson! Repped.

  9. #9
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: how to find and replace the following....

    If the ROW() function returns a single digit number, the preceding "0&" comes into play; if it returns a 2 digit number the '0&' is irrelevant since the Right function picks the last two characters only!

    thnx for the rep

  10. #10
    Registered User
    Join Date
    07-31-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: how to find and replace the following....

    i started this thread and since i dont know much about excel, can some one explain how to fix the original post?
    thanks

  11. #11
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: how to find and replace the following....

    In your first post, there should be an edit button/link to revise your original post.

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: how to find and replace the following....

    Sorry nachumama, I missed the fact that your thread was hijacked. roki4 has received an infraction for that breach of the rules.

  13. #13
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: how to find and replace the following....

    Assuming your text is entered in cell A1 in the same format as in your first post: =REPLACE(A1,53,2,RIGHT(0&ROW()+1,2))

    ...and just drag down. Happy to help provide a solution!

  14. #14
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: how to find and replace the following....

    Thank you for the negative rep, roki4.

  15. #15
    Registered User
    Join Date
    07-31-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: how to find and replace the following....

    sorry to keep bothering you guys, roki4 where exactly do i enter that formula?

  16. #16
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: how to find and replace the following....

    I think in the column next to A1 i.e. B1

  17. #17
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: how to find and replace the following....

    Quote Originally Posted by Cutter View Post
    Thank you for the negative rep, roki4.

    Anyway, moving forward, nachumama has this solved your issue? Cheers.
    Last edited by roki4; 08-01-2012 at 04:12 PM.

+ 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