+ Reply to Thread
Results 1 to 19 of 19

Find and replace macro for quick process

  1. #1
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Question Find and replace macro for quick process

    Hi Friends,

    i need quick find replace of numbers by macro as below rules for "E" Column.

    If 76 replace with 3"
    115 replace with 4½"
    150 replace with 6"
    230 =9"
    300=12"
    380=15"
    450=12"
    457=12"
    530=21"
    600=24"
    610=24"
    760=30"

    please arrange macro for quick find and replace operations.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Find and replace macro for quick process

    Here, try this for any size in mm:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note: Function will return two values. If you have only one value (like 230) then it will return 9" x 9" no matter only one size defined, without x.
    If you have such case let me know to adopt it.
    Last edited by zbor; 11-25-2016 at 04:00 AM.

  3. #3
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Hi Friend,
    thank you for your great help. i need for 450 is 18". but printed as 17 1/2". so please modify as custom definition like if found 450 then replace with 18" so individual definitions are required for find and replacing texts. and please convert as run macro function instead of function, for "C" column data. because my data is variable range in "C" column. please make it from 3" to 9". remaining definitions i will try.

    Thank you.
    Last edited by structo; 11-25-2016 at 05:19 AM.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Find and replace macro for quick process

    I would reply - but I have a question...

  5. #5
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Find and replace macro for quick process

    I have questions however based on the link above its probably best just to solve it without any queries....
    Please Login or Register  to view this content.
    If someone has helped you then please add to their Reputation

  6. #6
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Quote Originally Posted by pjwhitfield View Post
    hi friend, thank you for your contribution. how to use your macro? i have created new module. but no macro is visible to run macro.

    Thanking you.

  7. #7
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    How to run Post#5 code?

    Thank you all.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find and replace macro for quick process

    Like this.
    Attached Files Attached Files
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  9. #9
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Quote Originally Posted by bakerman2 View Post
    Like this.
    Hi friend,
    well explanation. this function was developed at "G" column. but i need replace at existing column "E". please tweak code as Run Macro button.

    Thanking you.

  10. #10
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Find and replace macro for quick process

    Try attachment (click Arrow). I left Function as is for all the work pj put in.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Hi friend,

    its working. thank you for contribution.

    Thank you all.

  12. #12
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Quote Originally Posted by bakerman2 View Post
    Try attachment (click Arrow). I left Function as is for all the work pj put in.
    hi friend,
    i got debug error due to some differences were occurred in my raw file.i need add on code to existing code for removing of merging and deleting of blank rows for consolidation of data. so please add.

    Thank you very much.
    Attached Files Attached Files
    Last edited by structo; 12-03-2016 at 10:38 AM.

  13. #13
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Find and replace macro for quick process

    Give this a try

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  14. #14
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Hi MIke friend,

    thank you for response. where i add your new modification to my old code?

    thank you.

  15. #15
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Find and replace macro for quick process

    In your main macro

    Please Login or Register  to view this content.

  16. #16
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Find and replace macro for quick process

    In your main macro

    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Quote Originally Posted by mike7952 View Post
    In your main macro
    yes friend now its converting well. but not happening un merging and not removed blank rows. please tweak as final code.

    Thank you very much

  18. #18
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Find and replace macro for quick process

    Maybe this

    Please Login or Register  to view this content.

  19. #19
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Find and replace macro for quick process

    Thank you Mike. now every thing is alright.

+ 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. Formula or process needed to quick cell value fill
    By Sfritz4831 in forum Excel General
    Replies: 1
    Last Post: 10-26-2016, 01:24 PM
  2. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  3. Unable to arrive at dynamic & automated alternative to manual find & replace process
    By calantha in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-19-2013, 03:55 AM
  4. Replies: 2
    Last Post: 06-12-2013, 03:48 PM
  5. [SOLVED] How to solve this? Find and replace? simple and quick - newbie
    By am1221 in forum Excel General
    Replies: 5
    Last Post: 09-14-2012, 05:00 AM
  6. Find/Replace Macro Using Replace Table
    By LampCommandr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2011, 11:00 AM
  7. [SOLVED] Using Find and Replace to replace " in a macro
    By snail30152 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2006, 06:58 PM

Tags for this Thread

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