Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to find cell content in sheets and make sheet active | Excel Discussion (Misc queries) | |||
Code using A sheet to find a number | Excel Discussion (Misc queries) | |||
find an exact number in a different sheet and use the cell containing the number to output information | Excel Programming | |||
Copy from active sheet and paste into new sheet using info from cell in active | Excel Programming | |||
How to detect current active sheet number | Excel Programming |