Query regarding any lookup function

R

Ram

I just want to know if any lookup value is repeating in range,which
function we should use at that time.
For ex

A B C
Name Value
a 2623
b 2561
c 12546
d 4563
a 452
c 223321
d 321

With above example i want to know how can we find each value for a in
lookup range A:A.
if is there any another nested function,please let me know

Regards
Ram
 
D

Donald Guillett

I just want to know if any lookup value is repeating in range,which
function we should use at that time.
For ex

A                             B                                 C
Name                      Value
a                              2623
b                             2561
c                             12546
d                             4563
a                              452
c                              223321
d                              321

With above example i want to know how can we  find each value for a in
lookup range A:A.
if is there any another nested function,please let me know

Regards
Ram

If you want to sum look in the help index for SUMIF. To count look for
COUNTIF
 
R

Ram

If you want to sum look in the help index for SUMIF. To count look for
COUNTIF- Hide quoted text -

- Show quoted text -

Hi,
I want to lookup the value for perticular name.For example if we use
vlookup for "a", as =vlookup(A3,A1:B7,2,0) then it will return 2623
for first occurence of "a" but i want to the value for second or third
occurence for a orb as 452 etc
 
G

Gord Dibben

Where do you want the results placed?

Some code by Don Guillet to return results to one cell..........C1

Option Explicit
Sub SAS_filternumbersfornames()
Dim mv As String
Dim mc As Long
Dim i As Long
Dim ms As String
mv = "a" 'value to lookup
mc = 1 'col A
For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
If Cells(i, mc) = mv Then ms = ms & Cells(i, mc + 1) & Chr(10)
Next i
MsgBox ms
Cells(1, mc + 2) = ms
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top