Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default determine the column where a cell was found


Hi all,

I have a find that returns the range of a cell where the search-value
is found. does anyone know how i can determine the column where this
cell is located?


Code:
--------------------
Set teamNameRng = searchRng.Find(What:=tempTeamName, _
After:=startRng, _
Lookat:=xlWhole, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False)
--------------------


Than a lot in advance
regards
thomas


--
usadream
------------------------------------------------------------------------
usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703
View this thread: http://www.excelforum.com/showthread...hreadid=526050

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default determine the column where a cell was found

Hi USADream,

Try:

Dim myCol as long

myCol = teamNameRng.Column


---
Regards,
Norman



"usadream" wrote in
message ...

Hi all,

I have a find that returns the range of a cell where the search-value
is found. does anyone know how i can determine the column where this
cell is located?


Code:
--------------------
Set teamNameRng = searchRng.Find(What:=tempTeamName, _
After:=startRng, _
Lookat:=xlWhole, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False)
--------------------


Than a lot in advance
regards
thomas


--
usadream
------------------------------------------------------------------------
usadream's Profile:
http://www.excelforum.com/member.php...o&userid=32703
View this thread: http://www.excelforum.com/showthread...hreadid=526050



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default determine the column where a cell was found


Hi,

thanx a lot for your reply:
now ur solution returns my the number of the column, but in the end,
what i need is defining a range in this column, so for e.g. if


Code:
--------------------
myCol = teamNameRng.Column
--------------------
-- myCol = 11

then i should be able to define a range like this:


Code:
--------------------
Set destrange = activeSheet.Range("myCol7 : myCol146")
--------------------

where 7 and 146 are start and end rows..

does anyone know the syntax for this?

help apreciated, thanx
thomas


--
usadream
------------------------------------------------------------------------
usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703
View this thread: http://www.excelforum.com/showthread...hreadid=526050

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default determine the column where a cell was found


nevermind, i found it out :-)


--
usadream
------------------------------------------------------------------------
usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703
View this thread: http://www.excelforum.com/showthread...hreadid=526050

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
Use cell to determine column in formula JeffC Excel Worksheet Functions 2 May 14th 09 04:53 PM
How do I determine the last cell in a Column Ayo Excel Discussion (Misc queries) 6 April 27th 09 12:46 PM
How to determine the column letter from Cell address Jean Excel Worksheet Functions 6 July 24th 06 03:04 AM
How can I determine the largest physical size cell in a column csa001 Excel Worksheet Functions 2 June 22nd 06 02:33 PM
Determine start column/ end column of Merged Cell jC! Excel Programming 3 July 8th 04 12:05 PM


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