Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi everyone.
Wondering if any one can help. The following code below is used in a large excel spreadsheet with a ton of numbers. in the top row (1) are reference numbers which at this preliminary stage in my coding I am just trying to find. (the reference numbers are in the sheet like this ex. 100,040 I hope the comma is not a big deal) Code: Sub ref() Dim RefNumber As Long Dim RefFound As Range RefNumber = Application.InputBox("Reference #", "Meter Point Reference_ Number", , , , , , 4) Set RefFound = Cells.Find(what:=RefNumber, *REALLY DONT KNOW WHAT_ TO PUT HERE", LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,_ SearchDirection:=xlNext) MsgBox "Found Reference # at column" & RefFound.Column End Sub I had gotten it to run but for every reference number I tried it gave me a column of 238 (even when i changed the reference number to a different corresponding column). Any help would be greatly appreciated. [For those wondering my goal is: find reference number, find last row with data in the column, copy range, paste into new sheet.] |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and Replace - delete the remainder of the text in the cell after my Find | Excel Programming | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
find and delete text, find a 10-digit number and put it in a textbox | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |