Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Find Number On Active Sheet

Hi All

I have a TextBox on a Userform TB1 I want to enter a number in the text box
click a CommandButton Com1 and find a number listed in column F - starting
from Row3 and ending in Row94 using the active sheet in the workbook. The
numbers are set to Text because I use a lot of leading zero's (any way of
getting rid of that annoying green tag on each cell) Is it possible to have a
macro that will do this and if so can you please guide me in the right
direction.
--
Many Thanks

Sue
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Find Number On Active Sheet

Sue,
"that annoying green tag"
On the Tools menu, click Options and then click the Error Checking tab.
Clear the Enable background error checking check box.

"macro that will do this"
The 'match' function can be use with code by using a prefix...
Application.WorksheetFunction.Match
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Sue"
wrote in message
Hi All
I have a TextBox on a Userform TB1 I want to enter a number in the text box
click a CommandButton Com1 and find a number listed in column F - starting
from Row3 and ending in Row94 using the active sheet in the workbook. The
numbers are set to Text because I use a lot of leading zero's (any way of
getting rid of that annoying green tag on each cell) Is it possible to have a
macro that will do this and if so can you please guide me in the right
direction.
--
Many Thanks
Sue
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Find Number On Active Sheet

have your button code call:

Sub findit(s As String)
Set r = Intersect(ActiveSheet.UsedRange, Range("F3:F94"))
For Each rr In r
If rr.Value = s Then
rr.Select
Exit Sub
End If
Next
End Sub

where s will be the value sought
--
Gary''s Student - gsnu200719
  #4   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Find Number On Active Sheet

Hi Gary

Re; where will the value be sought : I have 3 other TextBoxes and on finding
the info entered in TB1. I wanted these TextBoxes to fill with the info from
the sheet. e.g

TB1 finds the info on Row70 therefore
TB2 = the Value in cell D70
TB3 = the value in cell C70
TB4 = the value in cell B70

I can then find out quickly who sold what to whom.

The problem also is that the commandbutton "Find1" is normally a click
procedure, I have tried but I don't know how to call or attach the code to it.

Just a learner trying to make things easier for myself.

--
Many Thanks

Sue


"Gary''s Student" wrote:

have your button code call:

Sub findit(s As String)
Set r = Intersect(ActiveSheet.UsedRange, Range("F3:F94"))
For Each rr In r
If rr.Value = s Then
rr.Select
Exit Sub
End If
Next
End Sub

where s will be the value sought
--
Gary''s Student - gsnu200719

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
macro to find cell content in sheets and make sheet active Nigel Excel Discussion (Misc queries) 4 June 26th 14 02:38 PM
Code using A sheet to find a number Mike Excel Discussion (Misc queries) 6 March 8th 07 07:24 PM
find an exact number in a different sheet and use the cell containing the number to output information [email protected] Excel Programming 4 February 18th 07 08:59 PM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM
How to detect current active sheet number Mike Chen Excel Programming 3 April 3rd 04 04:41 PM


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