Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MACRE0
 
Posts: n/a
Default Find within a file as a function


Cell J22 generally contains the text "Project Name:" within a template.
But people mess with their files and this is not always the case. Also
it was not previously defined as Project Name (and since I can't
expect everyone to download a new template, can't be). What I would
like to do is be able to have a seperate file search through the
template to locate this cell and enter the information directly below.
I'm also not allowed to use a macro here. If however a macro is the
only way, I'll take any assistance you can provide. Thank you.


--
MACRE0
------------------------------------------------------------------------
MACRE0's Profile: http://www.excelforum.com/member.php...o&userid=10848
View this thread: http://www.excelforum.com/showthread...hreadid=473546

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think you'll need a macro.

Maybe something like:

Option Explicit
Sub testme01()

Dim FoundCell As Range
Dim FindWhat As String

FindWhat = "Project Name:"

With ActiveSheet.UsedRange
Set FoundCell = .Cells.Find(What:=FindWhat, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)

If FoundCell Is Nothing Then
MsgBox "not found"
Else
FoundCell.Offset(1, 0).Value = "someinformationthatyoudidn'tshare"
End If
End With

End Sub

MACRE0 wrote:

Cell J22 generally contains the text "Project Name:" within a template.
But people mess with their files and this is not always the case. Also
it was not previously defined as Project Name (and since I can't
expect everyone to download a new template, can't be). What I would
like to do is be able to have a seperate file search through the
template to locate this cell and enter the information directly below.
I'm also not allowed to use a macro here. If however a macro is the
only way, I'll take any assistance you can provide. Thank you.

--
MACRE0
------------------------------------------------------------------------
MACRE0's Profile: http://www.excelforum.com/member.php...o&userid=10848
View this thread: http://www.excelforum.com/showthread...hreadid=473546


--

Dave Peterson
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
Using the Hyperlink Function and finding filenames Jeni Q Excel Worksheet Functions 0 September 20th 05 02:37 PM
What function would let me find Batting Averages? pertimesco Excel Worksheet Functions 2 March 1st 05 01:38 PM
What function would let me find Batting Averages? pertimesco Excel Worksheet Functions 1 March 1st 05 01:03 PM
UDF and Calculation tree Ken Wright Links and Linking in Excel 1 February 6th 05 04:58 PM
ISNULL function - can't find it KitKat Excel Worksheet Functions 6 December 3rd 04 04:55 AM


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