+ Reply to Thread
Results 1 to 2 of 2

Converting Formula for VB

  1. #1
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Converting Formula for VB

    Hey I'm trying to convert the following formula to be entered in automatically in VB
    Please Login or Register  to view this content.


    Below is the code I have so far (LastRow is last row in current sheet, LR is last row in Data and LR1 is last row in HC). I get a error when running and the debugger highlights the longest line (with the formula). I have run the entry using Macro record and those results are posted below my code, the only problem is I don't know how to edit that particular format to look like my old format. I want to maintain this format so if anyone else uses my workbook it will be easier to follow


    Please Login or Register  to view this content.

    Please Login or Register  to view this content.



    I think the problem is somewhere in the fact that the formula uses quotation marks and the @ sign but those are understood differently in VBA

    Any help or suggestions would be appreciated

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Converting Formula for VB

    Hi minimacros;

    I found 3 errors in your formula before I gave up. I'm posting what I found and will let you continue. I was breaking the formula down to it's individual parts, then putting the parts back together. It was then very easy to see where the problem is.
    Please Login or Register  to view this content.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

+ 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