+ Reply to Thread
Results 1 to 5 of 5

Trying to combine 2 formulas in VBA but keep getting errors

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Question Trying to combine 2 formulas in VBA but keep getting errors

    I am trying to create a macro that looks in a cell and if the string that is in that cell begins with an "S" then it performs one formula and if it does not then it does a different formula. From a formula stand point, this is what I am trying to accomplish...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So my VBA looks like this...

    Please Login or Register  to view this content.
    The formulas work independently of each other in this code, but I can't use them together and I want to.

    Any answers, suggestions or guidance, is greatly appreciated.

    THANKS!!!!!

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Trying to combine 2 formulas in VBA but keep getting errors

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to combine 2 formulas in VBA but keep getting errors

    That did the magic...what is "rept"? I am not familiar with that.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Trying to combine 2 formulas in VBA but keep getting errors

    It's a Excel function.
    You can find it in Excel Help.

  5. #5
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to combine 2 formulas in VBA but keep getting errors

    Thanks for your help!!!

+ 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. [SOLVED] Combine Formulas - Vlookup: Blanks, Errors, Values
    By Emili Excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-01-2014, 01:28 PM
  2. [SOLVED] Combine UserForm_Initialize errors
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2013, 08:29 AM
  3. [SOLVED] Using Combine macro to combine multiple worksheets - need to modify to paste formulas
    By DLSmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2012, 09:07 AM
  4. [SOLVED] writing in formulas - getting errors
    By gryffin13 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2012, 11:42 AM
  5. ODBC formulas errors
    By theshark43 in forum Excel General
    Replies: 0
    Last Post: 07-25-2011, 04:49 PM
  6. Combine 2 formulas to ignore errors?
    By ross.mitchell in forum Excel General
    Replies: 4
    Last Post: 12-09-2009, 09:25 AM
  7. Replies: 1
    Last Post: 08-25-2005, 03:43 AM

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