+ Reply to Thread
Results 1 to 4 of 4

Using FormulaR1C1 to input complex formula into cell

  1. #1
    Registered User
    Join Date
    06-23-2008
    Posts
    16

    Using FormulaR1C1 to input complex formula into cell

    Hello again,
    I need to create formulas based on the contents of the above cell.
    An example:
    Please Login or Register  to view this content.
    The dates, however, are not going to be static. The date range must always be for eight years, but it will be eight years back from the previous month end.
    I think I can figure out how to change dates around so that it's always 8 years back from the current date, but I don't know how to handle inputting variables into that formula. There are too many quotation marks.
    Anyway, I'm kind of confused, any help appreciated, thanks.
    Very new with Macros and VBA.
    Using Excel 2003

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    You'll have to first declare your variables and then apply a value to them.

    Please Login or Register  to view this content.
    HTH

  3. #3
    Registered User
    Join Date
    06-23-2008
    Posts
    16
    Oh whoa I did not realize that i could just toss variable names into the middle of the string there. VBA lets you do all sorts of crazy things... I was doing crazy concatenation, using "" to print a ", etc.

    Thanks a lot.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Indeed!

    I'm continuously surprised at the flexibility and power of VBA, and how relatively simple some of the syntax can be.

    Rgds

+ 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