Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookups??? KevinUPS Excel Worksheet Functions 2 September 15th 08 07:50 PM
worksheets lookups JJC Excel Worksheet Functions 6 August 18th 05 08:42 PM
Lookups across worksheets sixpence668 New Users to Excel 3 July 23rd 05 12:50 AM
LOOKUPS - Creating LOOKUPs where two different values must BOTH be satisfied. Mr Wiffy Excel Worksheet Functions 2 May 16th 05 04:29 AM
Copying data within worksheets with lookups MAWII Excel Discussion (Misc queries) 4 April 26th 05 07:23 PM


All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"