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: 18
Default Return last column of dynamic range

I had some help yesterday from Bernie and Bob getting the first and last ROW
of a dynamic range and that worked great. Thanks again guys!
I've attempted to apply the same logic to try and return the first and last
COLUMN of a dynamic range and can't seem to get my hands around it for some
reason.

Here's what I have .
An excel spreadsheet with the letter "A" in cells A3 through A15.
I have this dynamic range formula:
=OFFSET(Sheet1!$1:$1,,,,MATCH("A",Sheet1!$1:$1,0))

All three of the following lines seems to return the first column the letter
"A" is found in the dynamic range: = 3
sTemp1 = Range("testcol2").Cells.Count
sTemp2 = Cells(Range("testcol2").Cells.Count).Column
sTemp3 = Range("testcol2").Cells(Range("testcol2").Cells.Co unt).Column

For the life of me I can't seem to get anything to return the LAST column
the letter "A" is found in.

Can anyone steer me in the right direction?

Bob, or Bernie, you guys out there?

Thanks Again!!

Jim


 
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
Dynamic range based on another column Carrie_Loos via OfficeKB.com Setting up and Configuration of Excel 2 May 11th 10 06:49 PM
multiple column dynamic range Robin Excel Discussion (Misc queries) 13 August 5th 09 10:28 PM
Formula to count every other column (dynamic range) Darlene New Users to Excel 7 November 18th 08 09:27 PM
Dynamic range using partial column? Donal P[_2_] Excel Discussion (Misc queries) 1 August 15th 07 10:00 PM
Return the row numbers or a dynamic range in VBA Jim[_9_] Excel Programming 3 July 14th 05 04:23 PM


All times are GMT +1. The time now is 08:15 AM.

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"