Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
lkd lkd is offline
external usenet poster
 
Posts: 6
Default output row number for corresponding non-zero value of match functi

Hello,

I have a list of items as shown below:

A .5
B
B .25
B .25
C
C 1

If a given letter has a value assigned to it, all of the instances of that
letter will have the same value. For example, all of the B's that have
values assigned all share the same value of .25 But the first B doesn't have
a value. (The reason for this is that there is another variable column that
adds another dimension, but I just simplied the problem here.)

I would like to be able to return that shared value, but I am having
difficulty doing so. I tried the Match command to pick out the row number to
incorporate it into other functions, but it only picks out the first
instance. This won't work because in some cases, the first instance is a
blank which returns a zero. I want to return the non-zero value.

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default output row number for corresponding non-zero value of match functi

Try this array formula** :

=INDEX(B1:B10,MATCH(1,(A1:A10="B")*(ISNUMBER(B1:B1 0)),0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"lkd" wrote in message
...
Hello,

I have a list of items as shown below:

A .5
B
B .25
B .25
C
C 1

If a given letter has a value assigned to it, all of the instances of that
letter will have the same value. For example, all of the B's that have
values assigned all share the same value of .25 But the first B doesn't
have
a value. (The reason for this is that there is another variable column
that
adds another dimension, but I just simplied the problem here.)

I would like to be able to return that shared value, but I am having
difficulty doing so. I tried the Match command to pick out the row number
to
incorporate it into other functions, but it only picks out the first
instance. This won't work because in some cases, the first instance is a
blank which returns a zero. I want to return the non-zero value.

Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default output row number for corresponding non-zero value of match functi

Please note that this is an array formula. Within the cell in edit mode (F2)
paste this formula and press Ctrl+Shift+Enter to apply this formula. If
successful in 'Formula Bar' you can notice the curly braces at both ends like
"{=<formula}"

Assuming your data is in ColA and ColB. To return row number

=MIN(IF((A1:A100="b")*(B1:B100<""),ROW(A1:A100)))

'First value for "b" from col B
=INDEX(B1:B100,MIN(IF((A1:A100="b")*(B1:B100<""), ROW(A1:A100))))


If this post helps click Yes
---------------
Jacob Skaria


"lkd" wrote:

Hello,

I have a list of items as shown below:

A .5
B
B .25
B .25
C
C 1

If a given letter has a value assigned to it, all of the instances of that
letter will have the same value. For example, all of the B's that have
values assigned all share the same value of .25 But the first B doesn't have
a value. (The reason for this is that there is another variable column that
adds another dimension, but I just simplied the problem here.)

I would like to be able to return that shared value, but I am having
difficulty doing so. I tried the Match command to pick out the row number to
incorporate it into other functions, but it only picks out the first
instance. This won't work because in some cases, the first instance is a
blank which returns a zero. I want to return the non-zero value.

Any suggestions?

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
How to get average of successive x-number cells to output in colum dysonsphere Excel Discussion (Misc queries) 3 January 23rd 09 03:55 PM
Lookup 2 columns of data, perform, match, output results John Excel Worksheet Functions 2 September 26th 08 11:30 AM
how to use subtotal and it has a drop down to choose other functi TransMan Excel Worksheet Functions 2 April 16th 08 04:30 AM
Search A Cell for Certain Letters Then Output a Number [email protected] Excel Discussion (Misc queries) 3 March 21st 07 04:55 PM
how do I isolate only one row in the criteria for the dsum functi. lxnv Excel Worksheet Functions 1 March 22nd 05 02:21 PM


All times are GMT +1. The time now is 01:51 PM.

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"