Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Find the beginning Cell of a Range

I have a user input a range, how can I store the beginning cell of that range
in a variable?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Find the beginning Cell of a Range

Dim myRng as range
dim myCell as range

'somewhat the user defines myRng

set mycell = myrng.cells(1)



J@Y wrote:

I have a user input a range, how can I store the beginning cell of that range
in a variable?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Find the beginning Cell of a Range

Thanks. What about the last cell?

"Dave Peterson" wrote:

Dim myRng as range
dim myCell as range

'somewhat the user defines myRng

set mycell = myrng.cells(1)



J@Y wrote:

I have a user input a range, how can I store the beginning cell of that range
in a variable?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Find the beginning Cell of a Range

In a one area range:

Dim myRng as range
dim myCell as range

'somewhat the user defines myRng

with myrng
set mycell = .cells(.cells.count)
end with

with a multi-area range

with myrng
with .areas(.areas.count)
set mycell = .cells(.cells.count)
end with
end with




J@Y wrote:

Thanks. What about the last cell?

"Dave Peterson" wrote:

Dim myRng as range
dim myCell as range

'somewhat the user defines myRng

set mycell = myrng.cells(1)



J@Y wrote:

I have a user input a range, how can I store the beginning cell of that range
in a variable?


--

Dave Peterson


--

Dave Peterson
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
Find Cell in Named Range David Excel Worksheet Functions 3 May 8th 07 06:00 AM
Find if any cell in range is above Zero [email protected] Excel Discussion (Misc queries) 3 April 19th 06 11:01 AM
find the cell above any number in any range steve alcock Excel Worksheet Functions 12 May 27th 05 05:48 AM
Find cell contents in range Nigel Excel Discussion (Misc queries) 7 May 16th 05 01:15 PM
find a cells from a range of cell kelvintaycc Excel Worksheet Functions 2 April 2nd 05 07:20 PM


All times are GMT +1. The time now is 05:14 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"