PDA

View Full Version : Lookup Help



The"Truth"
11-17-2008, 10:42 AM
When in excel i know that you can do a Lookup to return a single piece of data. Is there any way to do the same thing but have it return more that a single piece of data. For example, I am doing a Lookup via, the date, and then it is returning what part # was ran on that day. But here is where the problem is, we run mulitple part #s on the same day. Is there any way to get around this little problem?

Dr.K
11-17-2008, 11:56 AM
In VBA, you can use the .Find Method. This works just like the Ctrl-F Find does from the GUI.

.Find returns an Object reference to the found cell. This allows you to access nearby cells with .Offset(x, y)


Dim objCell As Range

Set objCell = RangeToSearch.Find("Find This", Parameters)

Debug.Print objCell.Offset(0, 1).Value
Debug.Print objCell.Offset(0, 2).Value
Debug.Print objCell.Offset(0, 3).Value

MaximS
11-17-2008, 11:58 AM
you can use auto filter to get the data meeting your criteria i.e date, part number.