+ Reply to Thread
Results 1 to 5 of 5

Run excel formula through VBA

Hybrid View

bagadiamohit Run excel formula through VBA 03-25-2015, 03:16 AM
Norie Re: Run excel formula through... 03-25-2015, 03:35 AM
bagadiamohit Re: Run excel formula through... 03-25-2015, 03:40 AM
Norie Re: Run excel formula through... 03-25-2015, 03:43 AM
bagadiamohit Re: Run excel formula through... 03-25-2015, 04:27 AM
  1. #1
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Run excel formula through VBA

    When you are trying to enter a formula that uses R1C1 notation you need to use FormulaR1C1 instead of Formula.
    If posting code please use code tags, see here.

  2. #2
    Registered User
    Join Date
    01-17-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Run excel formula through VBA

    You mean like this:

    Sheets(1).Range("C6" & "C" & LRow1).FormulaR1C1 = "= IF(ISERROR(VLOOKUP(RC[7],Sheet2!R4C2:R" & Lrow2 & "C2,1,FALSE)),RC[7],HYPERLINK(CELL(" & """address""" & ",INDEX(Sheet2!R4C2:" & "R" & Lrow2 & "C2,MATCH(RC[7],Sheet2!R4C2:" & "R" & Lrow2 & "C2,0))),RC[7]))"
    I tried the above..but its still not working..

    If possible, can you help me in re-writing this formula into vba?

    =IF(ISERROR(VLOOKUP(RC[7],Sheet2!R1C1:R20C1,1,FALSE)),RC[7],HYPERLINK(CELL("address",INDEX(Sheet2!R1C1:R20C1,MATCH(RC[7],Sheet2!R1C1:R20C1,0))),RC[7]))
    Last edited by bagadiamohit; 03-25-2015 at 03:42 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: 2
    Last Post: 03-21-2014, 11:43 AM
  2. Macro: Applying formula to multiple cells in excel (formula editing)
    By city in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2012, 06:41 AM
  3. Replies: 0
    Last Post: 03-19-2012, 07:32 PM
  4. Replies: 1
    Last Post: 03-04-2012, 12:03 AM
  5. Excel 2002 formula displayed not value formula option not checked
    By Dean in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2006, 10:35 AM

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