Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Search for data and return cell reference

I would like a forumla that searches my spreadsheet for a word, e.g. "july"
and returns the reference of the cell that it is in, so I can use it for the
rest of a lookup formula.

Any help would be most appreciated,
Rob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Search for data and return cell reference

Try this UDF:

Public Function julyy(inRng As Range) As String
Set r = Application.Caller
ad = r.Address
julyy = ""
For Each rr In inRng
If Not Intersect(rr, r) Is Nothing Then
Else
If rr.Value = "july" Then
julyy = rr.Address
Exit Function
End If
End If
Next
End Function

--
Gary''s Student - gsnu200796
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Search for data and return cell reference

See Help information for the function =Match()

Returns the relative position of an item in an array that matches a
specified value in a specified order. Use MATCH instead of one of the LOOKUP
functions when you need the position of an item in a range instead of the
item itself.
HTH
John
"exoticdisease" wrote in message
...
I would like a forumla that searches my spreadsheet for a word, e.g. "july"
and returns the reference of the cell that it is in, so I can use it for
the
rest of a lookup formula.

Any help would be most appreciated,
Rob


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Search for data and return cell reference

A UDF perhaps

this goes in a general module

Public Function FindMe(SrchFor As String, Rng As Range) As String
Set x = Application.Caller
For Each c In Rng
If Not Intersect(c, x) Is Nothing Then
Else
If c.Value = SrchFor Then
FindMe = c.Address
Exit Function
End If
End If
Next
End Function

call with =findme(a1,a2:d100)
Were A1 is what you are looking for

Mike

"exoticdisease" wrote:

I would like a forumla that searches my spreadsheet for a word, e.g. "july"
and returns the reference of the cell that it is in, so I can use it for the
rest of a lookup formula.

Any help would be most appreciated,
Rob

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
Search for data and return multiple fields Tenshi Excel Discussion (Misc queries) 2 July 28th 08 10:09 AM
Search a Row and return Header Row Data Aaron Excel Discussion (Misc queries) 2 March 28th 07 02:47 PM
Search Column Data and Return Multiple Values across Row Sam via OfficeKB.com Excel Worksheet Functions 3 September 30th 06 07:50 PM
Search for a number in a table and return data of a specific cell Karaman Excel Discussion (Misc queries) 4 June 30th 06 03:46 PM
search multiple sheets for specific date, return data in cell to r NonIllegitimiCarborundum Excel Discussion (Misc queries) 0 April 28th 06 09:02 PM


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