hello I am not very good at excel or Visual Basic and am having issues getting a report to do what I want.
Basically I need to search a column of data for a value and return the first matching cell. In this column I want to search for a specific number. The catch is that the column I am searching in has a lot of data (log entries with line breaks).
I can get the search function to return a value, but it just returns a number and that number is the index of where it found the data in the corresponding cell. so I can't use that number to return the actual value of the cell where it finds a match.
Sorry if this is somewhere else already (I'm sure it is), but my searching abilities are apparently not good enough to find it.![]()
Hi,Originally Posted by Hojo52
I don't quite follow this. You seem to be asking to find a specific number in a column, and then report what that number is. But since you're searching for it you already know what it is. Clearly I'm missing something.
Can you explain in another way exactly what you're trying to find, with a specific example perhaps. For instance search for number 7 in a column which contains 1,2,A, 7, 79, J43, 697, Joe... or whatever, and what you expect the result to be.
Rgds
Sure ...
I have a spreadsheet with a column in it that has log entries.
Example log entry - "243453-File missing header info..."
In this column I have multiple log entries per cell. So each cell could have 30 lines of entries seperated by line breaks.
I want to search this column for the number 243453 and return the content of the first cell that has this number in it.
I hope this helps.
One way:Originally Posted by Hojo52
HTHSub FindWholeCellValues() Dim stCellValue As String stCellValue = Range("A:A").Find(what:="243453") MsgBox stCellValue End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks