Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Function to extract and return the first and last cell from addres

Hi quartz

Try this

Sub test()
With Range("a10:g145") ' or With Selection
MsgBox .Cells(1).Address
MsgBox .Cells(.Cells.count).Address
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"quartz" wrote in message ...
Hello. I need a function that will return the top left cell address and the bottom right cell address from a range address.

For example:

Given: $AB$256:$AF$300 Return: Top left cell: AB256; Bot Right Cell: AF300

Given: A12:G53 Return: Top left cell: A12; Bottom Right Cell: G53

Can one function return both or do I need two separate functions?
Thanks much in advance.



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
need a function or property to extract the hyperlink from a cell J Excel Discussion (Misc queries) 2 January 15th 08 03:57 PM
need a function or property to extract the hyperlink from a cell J Excel Worksheet Functions 1 January 13th 08 09:32 PM
Is there a function to extract the URL part of a hyperlink in another cell? Rufus V. Smith Excel Worksheet Functions 4 March 28th 06 06:39 PM
Function to extract numbers from an alphanumeric cell diana Excel Worksheet Functions 4 March 13th 06 09:55 AM
How I can to extract a formula from other Cell Function? Tinjano Excel Discussion (Misc queries) 1 May 15th 05 08:24 PM


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