lookup macro??

D

darkbearpooh1

is there a macro or anything that can make it easier to find a matching
name from a different sheet and return a value in a cell that
corrosponds to the name? having too much trouble with lookup formulas
 
L

L. Howard Kittle

Well, VLOOKUP can be a bit confusing, so if you will offer up some idea of
what your data looks like and what you are seeking, I'm sure a solution is
possible.

But lets try this, on sheet 2 in A1:A3 enter 1, 2, 3.
In B1:B3 enter a, b, c.

On sheet 1 in cell B1 enter =VLOOKUP(A1,SHEET2!A1:B3,2,0)

On sheet 2, cell A1 enter 1, 2, or 3.

B1 returns "a", "b" or "c".

HTH
Regards,
Howard

"darkbearpooh1" <[email protected]>
wrote in message
news:[email protected]...
 
B

Biff

Hi!

You don't necessarily need a lookup formula. If the data to be returned is
numeric and there's only one instance of the "lookup" value you can use
Sumif or Sumproduct.

Just an observation:

You're using a lot of coded VBA procedures to do what simple worksheet
functions can do.

Biff

"darkbearpooh1" <[email protected]>
wrote in message
news:[email protected]...
 
D

darkbearpooh1

my problem lies and i think this is where i am getting confused,

the names i need to match are all in a row down the left side of the
totals sheet
no particular order and they can't be in any particular order.. i read
something about stuff has to be in ascending order? ok not only that
the names they will be looking for from the other sheet is in two
different columns to match two different columns of data ... what i
mean is say sheet 1 is my count sheet,
COLUMN A7:A47 has a list of names. so need to look at the next sheet
and see if the name is on it and it matches the name on sheet 1 and if
so return a value in a column related to it ... so the names on the
sheet 2 are in columns H28:H46and columns BC28:BC46 and matches the
data in column I27:I46 and AY28:AY46 Any ideas?

I think i have to many macros too but i just can't figure out a formula
for that and i think the other one doesn't look at the other side for
names and corresponding information?
 
D

darkbearpooh1

=IF(ISNA(MATCH($A7,INDIRECT(B$5&"!H28:H46"),0)),"",SUMIF(INDIRECT(B$5&"!H28:H46"),$A7,INDIRECT(B$5&"!I28:I46")))



ok, this function is working fine but how can i make it look not onl
down column h to find the answer in column I but also look down colum
BC to find the answer in column AY ? Thats the only problem i am havin
now ill post the file so you can examine it.

Got to go to work now ill check back tonight. Thanks!
Biff i had to add more columns to get another function to work that Bo
helped me with but i figured out how to match it back up to the correc
columns now so its working again but, it doesn't apear to be looking a
the other side and returning matches for names on the other side of th
schedule. TI

+-------------------------------------------------------------------
|Filename: LINEBARtest21.zip
|Download: http://www.excelforum.com/attachment.php?postid=4379
+-------------------------------------------------------------------
 
D

darkbearpooh1

not sure if that was easy to understand or not so i figured i would try
to elaborate, i need to lookup names on my count sheet if they are on
the second sheet and give the number that corresponds to the name in a
different cell but the problem is the names are down two seperate
columns and so is the numbers that corrospond to the names TIA for any
help especially those who have been helping me for awhile!! I almost
have exactly what i need =)
 
D

darkbearpooh1

Thanks Biff! tried to figure out on my own, I even posted another
question that if answered might help me solve it. So far no luck
 
D

darkbearpooh1

i am at work ill be home shortly and dl it to check it out... Thanks!
Was pulling my hair out on that because i was so d@#$ close to having
it!
 
Top