Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
lookups in other worksheets....
lookups in other worksheets....
I have two worksheets. One with textures and one with models. I want to know how many models a texture is used in. So I have libraryfile, texturefile in the TEXTURES worksheet and texture, modelfile in the MODELS worksheet. I've been toying with find.row, but to see if it is really there. If it's not, I'll get N/A.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
lookups in other worksheets....
One way:
Option Explicit Sub testme() Dim myOtherRng As Range Dim myCell As Range Dim res As Variant With Worksheets("othersheet") Set myOtherRng = .Range("a1:G" & .Cells(.Rows.Count, "A").End(xlUp).Row) End With With ActiveSheet Set myCell = .Range("a3") 'some cell??? res = Application.VLookup(myCell.Value, myOtherRng, 3, 0) If IsError(res) Then 'same as n/a 'what to do? Else myCell.Offset(0, 1).Value = res End If End With End Sub Steve Lim wrote: lookups in other worksheets.... I have two worksheets. One with textures and one with models. I want to know how many models a texture is used in. So I have libraryfile, texturefile in the TEXTURES worksheet and texture, modelfile in the MODELS worksheet. I've been toying with find.row, but to see if it is really there. If it's not, I'll get N/A.. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lookups??? | Excel Worksheet Functions | |||
worksheets lookups | Excel Worksheet Functions | |||
Lookups across worksheets | New Users to Excel | |||
LOOKUPS - Creating LOOKUPs where two different values must BOTH be satisfied. | Excel Worksheet Functions | |||
Copying data within worksheets with lookups | Excel Discussion (Misc queries) |