Closed Thread
Results 1 to 4 of 4

Insert excel formula to VBA - If function

  1. #1
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Insert excel formula to VBA - If function

    Hi All,

    How can i insert these formula's in VBA?


    first:
    Please Login or Register  to view this content.
    Second:
    Please Login or Register  to view this content.
    Third:
    Please Login or Register  to view this content.
    Fourth:
    Please Login or Register  to view this content.
    To this:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Insert excel formula to VBA - If function

    Hi
    One way you can transform these formulas into excel vba codes is by recording the macros.....

    Now one thing that matters is where you enter the formula...
    So follow exactly what I tell you
    1.go to developers tab and select "Record Macro"
    2. now select the cell where you want to enter that formula (please note that select only that cell, not any other because in vba codes formula changes according to the location where it is entered)
    3. now type in the formula in the required cell
    4. stop recording the macro....
    and you are done ....
    now replace the code you obtain from the recorded macro into your code...

    Hope it helps

    Do ask for any other query you may have…

    If you are satisfied then mark then PLEASE mark this thread as “SOLVED” (by going to thread tools at the top and clicking on “mark this thread as solved”) and you can just click on ADD REPUTATION below my post to say thanks...

    Regards
    Sourabh Gupta

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,647

    Re: Insert excel formula to VBA - If function

    It should be like this.......

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Insert excel formula to VBA - If function

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. getting table name while writing formula using insert function
    By paramnayak in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-31-2013, 09:57 AM
  2. Display formula from insert function
    By natejensen88 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-22-2011, 11:37 AM
  3. Insert excel formula using VBA......MATCH function is what i want to insert
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-07-2009, 07:31 PM
  4. Insert a number into a function formula
    By accur8ly in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-01-2007, 11:47 AM
  5. [SOLVED] Excel "Insert Formula" dialog always call my user defined function
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2006, 10:40 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