+ Reply to Thread
Results 1 to 3 of 3

need help integrating variable into macro that inserts formula into cell

  1. #1
    Registered User
    Join Date
    07-09-2014
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    10

    need help integrating variable into macro that inserts formula into cell

    The part of the code I am having trouble with is
    Please Login or Register  to view this content.
    I'm trying to have the macro input the above formula including my x variable, so that the resulting cell formula should be "=IF((LEFT(Sheet3!$Bx,LEN('Input Summary'!$B$1)))=$B$1,Sheet3!$Dx,"")"

    Please Login or Register  to view this content.
    I've looked at different threads dealing with the notation of R1C1 and including variables but what I have tried doesn't seem to be working.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: need help integrating variable into macro that inserts formula into cell

    Not sure it's doing what you need but try
    Take care when there is special characters (like space) in the sheet name
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    07-09-2014
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    10

    Re: need help integrating variable into macro that inserts formula into cell

    Thank you very much for the help! That works perfectly.

+ 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] Macro inserts date based on cell value
    By Aon007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2013, 05:47 PM
  2. [SOLVED] creating a macro that inserts the current date in the same cell everytime the macro is run
    By katie1994 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2012, 07:59 PM
  3. CELL that picks up or inserts text with formula
    By MikeR-Oz in forum Excel General
    Replies: 2
    Last Post: 02-26-2006, 06:45 AM
  4. [SOLVED] How to change font in a macro that inserts a formula in a footer
    By Alan Tolkoff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2005, 07:06 PM

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