ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   traverse data based on 2 conditions (https://www.excelbanter.com/excel-discussion-misc-queries/125170-traverse-data-based-2-conditions.html)

olga

traverse data based on 2 conditions
 
I have a worksheet from where i need to extract data based on 2 specified
conditions. For example, when the date & text in one row match my specified
date and text, then I extract a number from that row. Could you please help
me with this?

Thanks in advance!

Max

traverse data based on 2 conditions
 
One way, use something along these lines ..

Put in say D2, then array enter by pressing CTRL+SHIFT+ENTER
(instead of just presssing ENTER):
=INDEX(A2:A100,MATCH(1,(B2:B100=--"5-Jan-2006")*(C2:C100="Text"),0))

Above assumes A2:A100 contains the number you want to extract, while B2:B100
houses real dates & C2:C100 contains the text to be matched.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Olga" wrote:
I have a worksheet from where i need to extract data based on 2 specified
conditions. For example, when the date & text in one row match my specified
date and text, then I extract a number from that row. Could you please help
me with this?

Thanks in advance!


olga

traverse data based on 2 conditions
 
Thanks. :) I have one more question. Instead of actually typing the text (
like 5-Jan-2006 in (B2:B100=--"5-Jan-2006"), can I write something like
"B2:B100=--$A$1")?


"Max" wrote:

One way, use something along these lines ..

Put in say D2, then array enter by pressing CTRL+SHIFT+ENTER
(instead of just presssing ENTER):
=INDEX(A2:A100,MATCH(1,(B2:B100=--"5-Jan-2006")*(C2:C100="Text"),0))

Above assumes A2:A100 contains the number you want to extract, while B2:B100
houses real dates & C2:C100 contains the text to be matched.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Olga" wrote:
I have a worksheet from where i need to extract data based on 2 specified
conditions. For example, when the date & text in one row match my specified
date and text, then I extract a number from that row. Could you please help
me with this?

Thanks in advance!


Peo Sjoblom

traverse data based on 2 conditions
 
Yes

use

B2:B100=$A$1

no need for the unary minuses since it will recognize a date in a cell
without the need of coercing it

Regards,

Peo Sjoblom


Olga wrote:
Thanks. :) I have one more question. Instead of actually typing the text (
like 5-Jan-2006 in (B2:B100=--"5-Jan-2006"), can I write something like
"B2:B100=--$A$1")?


"Max" wrote:

One way, use something along these lines ..

Put in say D2, then array enter by pressing CTRL+SHIFT+ENTER
(instead of just presssing ENTER):
=INDEX(A2:A100,MATCH(1,(B2:B100=--"5-Jan-2006")*(C2:C100="Text"),0))

Above assumes A2:A100 contains the number you want to extract, while B2:B100
houses real dates & C2:C100 contains the text to be matched.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Olga" wrote:
I have a worksheet from where i need to extract data based on 2 specified
conditions. For example, when the date & text in one row match my specified
date and text, then I extract a number from that row. Could you please help
me with this?

Thanks in advance!


olga

traverse data based on 2 conditions
 
Thank you both for help!

"Peo Sjoblom" wrote:

Yes

use

B2:B100=$A$1

no need for the unary minuses since it will recognize a date in a cell
without the need of coercing it

Regards,

Peo Sjoblom


Olga wrote:
Thanks. :) I have one more question. Instead of actually typing the text (
like 5-Jan-2006 in (B2:B100=--"5-Jan-2006"), can I write something like
"B2:B100=--$A$1")?


"Max" wrote:

One way, use something along these lines ..

Put in say D2, then array enter by pressing CTRL+SHIFT+ENTER
(instead of just presssing ENTER):
=INDEX(A2:A100,MATCH(1,(B2:B100=--"5-Jan-2006")*(C2:C100="Text"),0))

Above assumes A2:A100 contains the number you want to extract, while B2:B100
houses real dates & C2:C100 contains the text to be matched.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Olga" wrote:
I have a worksheet from where i need to extract data based on 2 specified
conditions. For example, when the date & text in one row match my specified
date and text, then I extract a number from that row. Could you please help
me with this?

Thanks in advance!



Max

traverse data based on 2 conditions
 
Olga, you're welcome !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Olga" wrote in message
...
Thank you both for help!





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

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