+ Reply to Thread
Results 1 to 4 of 4

using formulas in excel vba

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    South Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    using formulas in excel vba

    Hi, I have a formula that works when i manually put it into excel... =IF(AND(ISTEXT($A12),ISERROR(MATCH($A12,$C:$C,0))),$A12,"") However when I try to use vba to put it into cell E12 I get compile error 1004 this is giving me a headache so I thought I would ask here... I'm not sure if this would copy the formula down all the way to the end of the loop and change the values like it would if you pressed ctrl + d in excel, if someone could help me out i would appreciate it. Here is my code
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: using formulas in excel vba

    You have not assigned "NumRows" to anything. Since it is empty, the loop will not work at all.

    Also you will need to use the formula this way -
    Please Login or Register  to view this content.
    Last edited by arlu1201; 11-02-2011 at 02:47 PM.

  3. #3
    Registered User
    Join Date
    11-02-2011
    Location
    South Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: using formulas in excel vba

    no i just did a snippet of my code. I have already defined it...
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: using formulas in excel vba

    Why do you need to?

    I can't tell what NumRows but this might be what you want
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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