Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default lookup, intersect, find ?

This assumes the value of animal and color will be found.
Dim val as Variant

Dim rng1 as Range, rng2 as Range
set rng1 = Range(Cells(1,1),Cells(1,2).End(xltoRight))
set rng2 = Range(Cells(1,1),Cells(2,1).End(xldown))

val = Cells(rng2.Find(color).row, rng1.Find(animal).Column).Value

--
Regards,
Tom Ogilvy


"Matt" wrote in message
...
Ok, I've searched the groups and haven't found exactly what I'm looking
for....or perhaps I'm just not understanding the solution... which is more
likely the case.

I have two variables; for this example we'll call them "Color" and

"Animal"
which are selected by users via a form. I then want to take those two
variables and search a table on a worksheet to find a value. The table

would
look like:

cat dog bird
red 0.31 0.22 0.11
blue 0.55 0.61 0.69
green 0.78 0.81 0.85

So assuming the user picked "dog" and "blue" in the form, the result would
be 0.61. Lookup and Intersect seem to based on already knowing the

address,
column, or row...is this correct?

I suppose I could search row 1 for the matching Animal, then search column

A
for the matching Color, and then finally do a lookup on those results. Is
there an easier way to do this without having to do three statements?

thanks!




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
Intersect Line GoodTrouble Charts and Charting in Excel 4 January 29th 08 05:08 PM
how to find an intersect of two columns sarora New Users to Excel 3 May 31st 06 03:32 AM
How do I find where a column value and row value intersect? Amy Excel Worksheet Functions 2 January 12th 05 11:19 PM
opposite of intersect David C. Excel Programming 2 August 25th 04 05:45 PM
Help with If Not Intersect derek Excel Programming 6 July 11th 03 04:39 PM


All times are GMT +1. The time now is 01:10 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"