Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Way to store cell location to variable?


I was wondering if there was a way to store a cell's location t
variables.

Something like:

Code
-------------------

int a, b
Cell(a, b) = ActiveCel
-------------------


I'm currently working with a fairly large worksheet, and I'm usin
Cells.Find to look for a specific cell. Then I want to Filter tha
column, but I can't figure out what column Selection.AutoFilte
Field:=?? should be.

Any suggestions

--
farfu
-----------------------------------------------------------------------
farful's Profile: http://www.excelforum.com/member.php...fo&userid=3617
View this thread: http://www.excelforum.com/showthread.php?threadid=56089

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Way to store cell location to variable?

Farful

Here are a few ways

Sub AssignToVariables()
Dim sAddress
Dim lRow As Long
Dim iColumn As Integer
With ActiveCell
sAddress = .Address
lRow = .Row
iColumn = .Column
End With
MsgBox "Active cell address is " & sAddress & Chr(13) & _
"Row is, " & lRow & ". Column is, " & iColumn & "." & Chr(13) & _
"Therefore I can also reference it: Cells(" & lRow & " , " & iColumn &
")"
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"farful" wrote in
message ...

I was wondering if there was a way to store a cell's location to
variables.

Something like:

Code:
--------------------

int a, b
Cell(a, b) = ActiveCell
--------------------


I'm currently working with a fairly large worksheet, and I'm using
Cells.Find to look for a specific cell. Then I want to Filter that
column, but I can't figure out what column Selection.AutoFilter
Field:=?? should be.

Any suggestions?


--
farful
------------------------------------------------------------------------
farful's Profile:
http://www.excelforum.com/member.php...o&userid=36172
View this thread: http://www.excelforum.com/showthread...hreadid=560892



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
how to set up a simple variable in Excel, but cell location independent Alberta K. New Users to Excel 3 December 19th 07 03:55 PM
how to set up a simple variable in Excel, but cell location independent Alberta K. Excel Worksheet Functions 3 December 19th 07 03:55 PM
Store cell data in a variable snowing[_2_] Excel Programming 1 May 28th 06 07:04 PM
VBA - Passing Cell Location To Variable ajocius[_35_] Excel Programming 2 October 4th 05 01:55 PM
using variable as cell location Brad[_14_] Excel Programming 5 January 5th 04 07:17 PM


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