+ Reply to Thread
Results 1 to 4 of 4

convert excel formula into macro

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    convert excel formula into macro

    Hello Everyone.

    I want to convert three excel formula into macro.

    1)First function, SUBSTITUTE should work on columns (H, I and J) of sheet "DATA" to remove single and multiple spaces. (e.g same formula should used like for col B of output sheet)

    2)Second, user-defined function (PARSE) should work on column I and J of sheet "Data" (e.g same formula should used like for col C of output sheet)

    3)Third, SUBSTITUTE should work on columns (H, I and J) of sheet "DATA" to replace semicolon with new line (e.g same formula should used like for col D of output sheet)

    4)Use wrap text button so that data will be present properly.


    For the demo, I put all this three formula in column B, C, D of sheet "Output" by taking a single column from old sheet.

    Advance thanks for your help
    Attached Files Attached Files

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: convert excel formula into macro

    Hi abraham30,

    You can use the usual Functions by using the below in the IDE;

    Application.WorksheetFunction.Substitute/SumIf/CountIf etc etc etc

    Hth
    Remember you are unique, like everyone else

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: convert excel formula into macro

    I have not that much idea about scripting.
    Can you please spare few minutes from your valuable time and looking into this matter.

    Advance thanks

  4. #4
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: convert excel formula into macro

    OK, Here's how Substitute works in VBA;

    This example removes the spaces in the Cell 'A1".

    Please Login or Register  to view this content.
    The 'PARSE' User Defined Function (UDF) is already written in VBA.

    Hth

+ 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. convert formula to macro.
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2013, 08:31 PM
  2. Convert formula to a Macro
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-17-2012, 08:04 AM
  3. Convert Excel Formula to Macro Code
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-28-2009, 10:14 PM
  4. Convert CSE formula to a macro
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2009, 10:16 PM
  5. [SOLVED] need macro: convert formula to value
    By moshe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2005, 12:06 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