+ Reply to Thread
Results 1 to 10 of 10

find replace and paste special values

  1. #1
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    find replace and paste special values

    Hi - I wouldered if there was a way to amend the macro below or if someone may recommend a different approach if needed.

    When I export to excel one of the Columns (AA) should export as numbers eg 01 - 05, 06 - 09, 10 - 49 .... ect ect but excel formats 01 - 05 as 01-May and 06 - 09 as 06 - Sep.

    As there are up to 20K rows I'm looking for the most efficient way of doing this. To this end, I tried this code below but still have the same formatting issue as it doesn't find/Replace and replace with "paste Special Values"

    Has someone got a macro for this?

    Many thanks


    Please Login or Register  to view this content.
    Find Replace
    01-May 01-05
    06-Sep 06-09
    Oct-49 10-49
    01-May 01-05
    Last edited by Blake 7; 12-10-2014 at 05:54 AM.
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  2. #2
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: find replace and paste special values

    Hi!

    Can't you format the AA column as text BEFORE pasteing the data?
    Please Login or Register  to view this content.
    my 2c
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  3. #3
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: find replace and paste special values

    Multsumesc for you input and thanks for taking the time to help! however, this resulted in a run time error 13 type mismatch..

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: find replace and paste special values

    Blake,
    You need to remove the set.
    The point is: You need to format the column you wan to paste the data in to text first.
    Range("AA2:AA20000").NumberFormat = "@"
    Or post your sample

  5. #5
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: find replace and paste special values

    Hi - Thanks for your response. I think id be better off posting a sample! I'll do it from work tomorrow. Cheers mate for response.

  6. #6
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: find replace and paste special values

    Hi again,

    I was trying to avoid the effect of excel reading as date format instead of number/text format so you won't be need to use the multiFindNReplace() Sub.
    If the column AA was formated as text BEFORE any values are inserted in, the values would not be converted to date.
    So before inserting values into column AA you should try and formating it as text with the following code:
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: find replace and paste special values

    I do not think the issue is formatting, but the code itself. If it is formatting issue, you could use line

    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: find replace and paste special values

    Hey Guys, cant wait to get to work tomorrow to see if i can sort this issue! thanks both for your help. I'll be sure to feedback the outcome.

    @ Bulina - i've been to Romania many times to play in badminton tournaments, Iasi, Tulcea, Bacau, Bucharest... love mitch and sarmarle! There is a great restaurant called La Mamma in Bucherest which serves traditional food you should check it out!

  9. #9
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: find replace and paste special values

    Right - I'm at work ! going to test this !!

  10. #10
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: find replace and paste special values

    Hi, just to feedback - thanks AB, i added this line to the code
    Please Login or Register  to view this content.
    and boom - done and dusted!

    Many thanks both for taking the time to assist! perfect!

+ 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. Replies: 1
    Last Post: 12-05-2012, 11:37 AM
  2. Paste Special Values Next to ActiveCell Using Cells.Find
    By DAK266 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2012, 01:17 PM
  3. [SOLVED] Macro to find SKU in column; then copy data in row and paste special (values)
    By Starkey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-13-2012, 06:05 AM
  4. Find * Column A and Paste Special Values
    By Racer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-11-2010, 07:28 PM
  5. Paste Special Values/Replace - Problems
    By Jokacave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2008, 09:57 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