LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Can I set a variable to be equal to the range of an entire column?

Hi,

I am trying to set a variable named idrange to column D in a sheet - the
values in this column will vary (ie - values may go through row 54 but then
may be updated to have values through row 67, etc). I need to capture all
cells in column D that have values as each cell in column D that does have a
value will be evaluated in a subsequent equation in the code. I have not
been able to figure out how to set my variable to equal the range of column
D...below is that code I have - I get a "Runtime error '1004';" error with
this code - is it possible to do what I'm trying to do?

Sub purgepayment()

Dim payment
Dim opentranpay
Dim rownumpay As Integer
Dim idrange As Range
Dim payrange As Range
Dim y As Integer

Sheets("Member ID Report Master").Activate
Set idrange = Range(Columns("D:D"))




--
Robert
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Unique Values in a entire column, not just range Brian Excel Worksheet Functions 10 May 16th 09 08:48 PM
How to check for a date range match in one column and then count thevalues equal to in another Jon[_6_] Excel Worksheet Functions 5 January 18th 08 11:54 AM
How do I make a range of cells in a column equal to another cell jggsfl New Users to Excel 1 December 21st 07 01:15 AM
setting a range variable equal to the value of a string variable Pilgrim Excel Programming 2 July 1st 04 11:32 PM
how do i set an entire row or column to a range? strataguru[_13_] Excel Programming 7 December 25th 03 04:08 AM


All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"