+ Reply to Thread
Results 1 to 4 of 4

Convert Excel formula to VBA code

  1. #1
    Registered User
    Join Date
    10-27-2009
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel 2003
    Posts
    26

    Convert Excel formula to VBA code

    I would like to convert the below formula into a vba code:

    =IF(ISNA(VLOOKUP($G8,Lookup!$A$2:$J$831,2,FALSE)),"",VLOOKUP($G8,Lookup!$A$2:$J$831,2,FALSE))

    Thanks in advance

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Convert Excel formula to VBA code

    Hi Grumpy,

    You might try:
    Please Login or Register  to view this content.
    Change the result cell as needed, I just used cell A1 as an example.

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    Des Moines, IA
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Convert Excel formula to VBA code

    Try Application.Evaluate, as in:

    Please Login or Register  to view this content.
    If you want to use an argument, try:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-27-2009
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Convert Excel formula to VBA code

    Thanks! I'll give them a try.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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