+ Reply to Thread
Results 1 to 2 of 2

Can't assign price/date from another cell to variable

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    1

    Can't assign price/date from another cell to variable

    Hi,

    A fairly basic question. I'm getting a 'runtime error 13: type mismatch' when I tried assigning a price or date from another cell to a variable.

    I've tried the following:

    Please Login or Register  to view this content.
    I need to assign the variable while I am running a 'For each [cell] in [range]' loop, so I'll need to assign a new value to the variable for each leg of the loop. I've declared Date1 as a date.

    Hope that that's sufficiently clear, forgive my bad programming grammar, I'm pretty new to the scene. Ideas?

    Thanks,

    vanckzhu

    EDIT: Never mind, I was being an idiot. My problem was not with the variables, it was with the select case code.
    Last edited by vanckzhu; 08-12-2010 at 01:53 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Can't assign price/date from another cell to variable

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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