Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Look up number
David
one way ... Private Sub CommandButton1_Click() Dim lValue As Long Dim sRange As String lValue = InputBox("Enter the search value", "Search and Change") sRange = "" On Error Resume Next sRange = _ Cells.Find(What:=lValue, _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False).Address On Error GoTo 0 If sRange = "" Then MsgBox "Value not found" Exit Sub End If For Each sht In Sheets(Array("January", "February", "March")) ' etc ... With sht .Range(sRange) = lValue End With Next 'sht End Sub Or you could select (group) all the sheets and just enter the value once and reselect the original sheet. Regards Trevor "David W" wrote in message ... If you had a command button on sheet12 that you were putting code in and you were looking at cell sheet12!B6 can you search for that number in 12 different sheets in column N and change that number in all 12 sheets All of the 12 sheets represent months of the year and are identical in layout being if you looked at jan!n10 and the number was 314 it would be 314 in the rest of the months in cells n10 thanks david |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
convert text-format number to number in excel 2000%3f | Excel Discussion (Misc queries) | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |