Results 1 to 5 of 5

Assign Cell value to a variable

Threaded View

  1. #1
    Registered User
    Join Date
    11-20-2010
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Assign Cell value to a variable

    Hello all,

    Long time-- no post. Hope all is well!

    I need some assistance with a macro I'm working on. This should be pretty simple.

    I need to take the value of cell C8 on the Home Tab of my active workbook and assign it to a variable (I believe an integer). The variable will be used as a date filter. (The input cell is a short date).

    Here is what I have:

    Dim filterdate As Integer
    filterdate = ActiveWorkbook.Worksheets("Home").Range("C8").Value
    
    ActiveSheet.Range("A1:AD" & intRowCount).AutoFilter Field:=13, Criteria1:= _
            ">=" & filterdate, Operator:=xlAnd

    Thanks again!!
    Last edited by Pergo; 03-18-2015 at 03:08 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: 07-24-2012, 11:47 AM
  2. [SOLVED] VBA variable assign on cell search
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2012, 02:23 PM
  3. Assign cell value to variable
    By Rookie_User in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-02-2012, 04:39 PM
  4. [SOLVED] assign cell content to variable
    By echomom in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2011, 01:47 PM
  5. How do I assign the value in a cell to a variable?
    By JasonK in forum Excel General
    Replies: 8
    Last Post: 06-07-2006, 06:25 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