Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default loop to find cells with specified value


Sorry for a really daft question, I’ve trawled the internet trying t
find this particular method of extract the range value. I have a loo
that looks for cells that contact a particular value, one a cell i
found it should call another sub passing the cell name i.e B3 as a
argument.

Sub FindValueOfCell()
For Each Cell In Range("A1:L40")
If Cell.Value = "Apple" Then
Call DrawBordersFunction(Pass range value to other sub?)
End If
Next
End Su

--
webby200
-----------------------------------------------------------------------
webby2006's Profile: http://www.excelforum.com/member.php...fo&userid=3674
View this thread: http://www.excelforum.com/showthread.php?threadid=56901

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default loop to find cells with specified value

Sub FindValueOfCell()
For Each cell In Range("A1:L40")
If Trim(LCase(cell.Value)) = Trim(LCase("Apple")) Then
MsgBox cell.Address
End If
Next
End Sub

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"webby2006" wrote:
|
| Sorry for a really daft question, I've trawled the internet trying to
| find this particular method of extract the range value. I have a loop
| that looks for cells that contact a particular value, one a cell is
| found it should call another sub passing the cell name i.e B3 as an
| argument.
|
| Sub FindValueOfCell()
| For Each Cell In Range("A1:L40")
| If Cell.Value = "Apple" Then
| Call DrawBordersFunction(Pass range value to other sub?)
| End If
| Next
| End Sub
|
|
| --
| webby2006
| ------------------------------------------------------------------------
| webby2006's Profile:
http://www.excelforum.com/member.php...o&userid=36744
| View this thread: http://www.excelforum.com/showthread...hreadid=569010
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default loop to find cells with specified value


Dave
Perfect thank you.


Dave Patrick Wrote:
Sub FindValueOfCell()
For Each cell In Range("A1:L40")
If Trim(LCase(cell.Value)) = Trim(LCase("Apple")) Then
MsgBox cell.Address
End If
Next
End Sub

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


|



--
webby2006
------------------------------------------------------------------------
webby2006's Profile: http://www.excelforum.com/member.php...o&userid=36744
View this thread: http://www.excelforum.com/showthread...hreadid=569010

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default loop to find cells with specified value

You're welcome.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"webby2006" wrote:
|
| Dave
| Perfect thank you.


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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Make a loop to Find a value then move a row of cells Bill F Excel Programming 1 June 8th 06 08:24 AM
Loops to find blanks then loop to find populated Bevy Excel Programming 0 June 1st 06 04:50 PM
Loop through a range of cells to find unique entries zoot Excel Programming 2 April 29th 06 02:08 PM
Problem with cells.Find within a loop jowatkins Excel Programming 4 December 9th 03 01:39 PM


All times are GMT +1. The time now is 04:22 PM.

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"