+ Reply to Thread
Results 1 to 7 of 7

Formula to VBA

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Formula to VBA

    Hi Team,

    I need your help to convert this formula into VBA code.

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula to VBA

    Excel has an excellent tool for this, calling Macro Recorder.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    10-30-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2007 Pro
    Posts
    27

    Re: Formula to VBA

    Or try this. I'm afraid I've forgotten who wrote it (it wasn't me) but I've found it really handy.

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,065

    Re: Formula to VBA

    Or just:

    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  5. #5
    Registered User
    Join Date
    10-30-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2007 Pro
    Posts
    27

    Re: Formula to VBA

    wow - I never knew about Evaluate!
    Apparently you could also just use this (I think):

    Please Login or Register  to view this content.
    Got it from here: http://www.ozgrid.com/forum/showthread.php?t=52372

  6. #6
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: Formula to VBA

    Thanks All.
    I am getting error while converting the above code using arguments. Kindly let me know if you find out the error.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-30-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2007 Pro
    Posts
    27

    Re: Formula to VBA

    Are you trying to insert the formula in the cell or the result of the formula into the cell? It looks to me like you're trying to insert the formula into the cell.

    Use this to insert the formula:
    Please Login or Register  to view this content.
    Use this to insert the result:
    Please Login or Register  to view this content.
    Last edited by jeremyfox36; 11-26-2014 at 08:13 AM.

+ 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: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04: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