Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default General Question regarding passing cells, ranges, cell values through subs & functions

Thanks for the answers Tom, they are most appreciated. A couple of
questions though - 1) If I don't use .EntireRow won't I get the
intersection of the cell and the entire range("A:F") when all I want is
the items on that one row? 2) By accident, I left off the following
statement in the subroutine: Sub AnalyzeIt(Checkrange as Range) Dim
arr(6) Dim res(2000,6) arr = Checkrange.Value but if I do that,
then I probably don't need the arr(1).value do I, it could just be
arr(1) Is there a way to directly access CheckRange as such as
follows: Sub AnalyzeIt(Checkrange As range) Dim res(2000,6) If Not
CheckRange(1).Value Is Nothing Then etc.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default General Question regarding passing cells, ranges, cell values through subs & functions

Thanks for the answers Tom, they are most appreciated. A couple of
questions though - 1) If I don't use .EntireRow won't I get the
intersection of the cell and the entire range("A:F") when all I want is
the items on that one row?

If you want the whole row, then you would need Entirerow. It wasn't clear
that is what you wanted.


2) By accident, I left off the following
statement in the subroutine: Sub AnalyzeIt(Checkrange as Range) Dim
arr(6) Dim res(2000,6) arr = Checkrange.Value but if I do that,
then I probably don't need the arr(1).value do I, it could just be
arr(1) Is there a way to directly access CheckRange as such as
follows: Sub AnalyzeIt(Checkrange As range) Dim res(2000,6) If Not
CheckRange(1).Value Is Nothing Then etc.


yes, you can use CheckRange(1) to refer to column a of the A to F range and
CheckRange(2) to refer to Column B. etc

but why would CheckRange(1) be nothing? Not sure you need this check. Your
code doesn't call AnalyzeIt unless there is an intersection and so
EntryIsValid should produce a range.



--
Regards,
Tom Ogilvy




" wrote in message
...
Thanks for the answers Tom, they are most appreciated. A couple of
questions though - 1) If I don't use .EntireRow won't I get the
intersection of the cell and the entire range("A:F") when all I want is
the items on that one row? 2) By accident, I left off the following
statement in the subroutine: Sub AnalyzeIt(Checkrange as Range) Dim
arr(6) Dim res(2000,6) arr = Checkrange.Value but if I do that,
then I probably don't need the arr(1).value do I, it could just be
arr(1) Is there a way to directly access CheckRange as such as
follows: Sub AnalyzeIt(Checkrange As range) Dim res(2000,6) If Not
CheckRange(1).Value Is Nothing Then etc.



Reply
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
Basic Question on Subs JOUIOUI Excel Worksheet Functions 4 June 13th 06 01:28 PM
Common Functions and Subs rbnorth Excel Discussion (Misc queries) 3 February 15th 06 10:07 PM
General Question regarding passing cells, ranges, cell values through subs & functions [email protected] Excel Programming 1 September 4th 04 09:09 PM
Passing values between 2 subs ? [email protected] Excel Programming 1 November 21st 03 05:56 PM


All times are GMT +1. The time now is 09:26 PM.

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

About Us

"It's about Microsoft Excel"