Results 1 to 5 of 5

Update cell value based on fixed and variable value

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Question Update cell value based on fixed and variable value

    Hi,

    I have a variable with a year called RYear which, for this example, has a value of 2013. I want my cell value to be "Period = 2013"

    I want the macro to update the cell value with the following kind of code:

    Range("A9") = "Period = " + RYear

    However, that gives me a Run-time error '13' Type mismatch.

    How do I have to change this line to make it work?

    RYear is an integer if that matters.
    Last edited by The Phil; 01-08-2014 at 08:27 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 11-22-2011, 12:33 PM
  2. linked cell - variable rather than fixed?
    By FirePig in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2008, 05:30 PM
  3. From a fixed cell to a variable
    By daniroy@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-21-2006, 09:20 AM
  4. Replies: 0
    Last Post: 05-24-2005, 06:31 AM
  5. Replies: 0
    Last Post: 05-23-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