Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default ActiveCell.Address

Hey guys

The below code pulls back the active cell address. How do
I get it to return only the number portion of the
address? For instance if location is equal to J22, I want
to retrieve only the 22.

Dim Location
Location = ActiveCell.Address



Thank you
Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default ActiveCell.Address

Dim Location
Dim i As Long
Location = ActiveCell.Address(True, False)
For i = 2 To 3
If Mid(Location, i, 1) = "$" Then
Exit For
End If
Next
Location = Mid(Location, i + 1, 3)

--
HTH

-------

Bob Phillips
"Todd Huttenstine" wrote in message
...
Hey guys

The below code pulls back the active cell address. How do
I get it to return only the number portion of the
address? For instance if location is equal to J22, I want
to retrieve only the 22.

Dim Location
Location = ActiveCell.Address



Thank you
Todd Huttenstine



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default ActiveCell.Address

Use......

Location = ActiveCell.Row

You can also use: ActiveCell.Column to get the column number if you need
that.

Cheers
Nigel

"Todd Huttenstine" wrote in message
...
Hey guys

The below code pulls back the active cell address. How do
I get it to return only the number portion of the
address? For instance if location is equal to J22, I want
to retrieve only the 22.

Dim Location
Location = ActiveCell.Address



Thank you
Todd Huttenstine



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ActiveCell.Address

Location = Activecell.Row

-----Original Message-----
Hey guys

The below code pulls back the active cell address. How do
I get it to return only the number portion of the
address? For instance if location is equal to J22, I

want
to retrieve only the 22.

Dim Location
Location = ActiveCell.Address



Thank you
Todd Huttenstine
.

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
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
use of activecell inquirer Excel Programming 8 May 16th 04 06:39 AM
Activecell value Shamsul Islam Excel Programming 5 April 30th 04 10:10 PM
how to set activecell? ljb[_2_] Excel Programming 2 November 18th 03 04:49 PM
LINKING Address cells from an EXCEL spreadsheet to fill MapQuest Address Info Duane S. Meyer Excel Programming 0 August 30th 03 12:16 AM


All times are GMT +1. The time now is 02:54 AM.

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"