ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find first row with given value (https://www.excelbanter.com/excel-worksheet-functions/112712-find-first-row-given-value.html)

[email protected]

Find first row with given value
 
I have the following values in column A (object name) and B (sort
order):
O1 | 1
O2 | 2
O2 | 3
O2 | 4
O3 | 5
O3 | 6

In column C I want to return the lowest B value for each object name in
column A.

That means I would like to get the following result:
O1 | 1 | 1
O2 | 2 | 2
O2 | 3 | 2
O2 | 4 | 2
O3 | 5 | 5
O3 | 6 | 5

If someone please can help me immediately with a function I'm forever
grateful since I have a deadline to catch now...

Regards,

S


Bernard Liengme

Find first row with given value
 
Assuming the 'objects' are in A1:A6 and the 'sort order' in B1:B6, then
=MIN(IF($A$1:$A$6=A1,$B$1:$B$6,""))
works for me when entered in to C1 as a array formula (ie using
CTRL+SHIFT+ENTER) and then copied down the column
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

wrote in message
oups.com...
I have the following values in column A (object name) and B (sort
order):
O1 | 1
O2 | 2
O2 | 3
O2 | 4
O3 | 5
O3 | 6

In column C I want to return the lowest B value for each object name in
column A.

That means I would like to get the following result:
O1 | 1 | 1
O2 | 2 | 2
O2 | 3 | 2
O2 | 4 | 2
O3 | 5 | 5
O3 | 6 | 5

If someone please can help me immediately with a function I'm forever
grateful since I have a deadline to catch now...

Regards,

S




Marcelo

Find first row with given value
 
Hi,

=vlookup(a2,$a$2:$b$7,2,0)

copy it down

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



" escreveu:

I have the following values in column A (object name) and B (sort
order):
O1 | 1
O2 | 2
O2 | 3
O2 | 4
O3 | 5
O3 | 6

In column C I want to return the lowest B value for each object name in
column A.

That means I would like to get the following result:
O1 | 1 | 1
O2 | 2 | 2
O2 | 3 | 2
O2 | 4 | 2
O3 | 5 | 5
O3 | 6 | 5

If someone please can help me immediately with a function I'm forever
grateful since I have a deadline to catch now...

Regards,

S




All times are GMT +1. The time now is 04:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com