Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have a spreadsheet: 1 2 100 5 6 200 5 11 300 I want to find a row which where first column has a specific value and the second column has a specific value, and print a value in the third column. So, I want something like: = FIND_VALUE (A1:A3 ; 5 ; B1:B3 ; 6 ; C1) // finds 5 in the first column and 6 in the second And it should show the value 200 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way...
Array entered** : =INDEX(C1:C3,MATCH(1,IF(A1:A3=5,IF(B1:B3=6,1)),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 "bim-bom" wrote in message ... Hi, I have a spreadsheet: 1 2 100 5 6 200 5 11 300 I want to find a row which where first column has a specific value and the second column has a specific value, and print a value in the third column. So, I want something like: = FIND_VALUE (A1:A3 ; 5 ; B1:B3 ; 6 ; C1) // finds 5 in the first column and 6 in the second And it should show the value 200 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
T. Valko pisze:
One way... Array entered** : =INDEX(C1:C3,MATCH(1,IF(A1:A3=5,IF(B1:B3=6,1)),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. Thank you very much - it works perfectly. Now I know how to know make things like that. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you know that the pairs in columns A and B will always be unique, then you
can use SUMPRODUCT() in pre-2007 Excel, or SUMIFS() in Excel 2007. By unique, I mean there would not be another row with 5 in a AND 6 in B. Excel 2003 formula: =SUMPRODUCT(--(A$1:A$3=5),--(B$1:B$3=6),C$1:C$3) you can substitute a cell address for 5 and 6. Excel 2007 formula: =SUMIFS(C$1:C$3,A$1:A$3,"=" & 5,B$1:B$3,"=" & 6) again, you can substitute cell addresses for the 5 and 6 "bim-bom" wrote: Hi, I have a spreadsheet: 1 2 100 5 6 200 5 11 300 I want to find a row which where first column has a specific value and the second column has a specific value, and print a value in the third column. So, I want something like: = FIND_VALUE (A1:A3 ; 5 ; B1:B3 ; 6 ; C1) // finds 5 in the first column and 6 in the second And it should show the value 200 . |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "bim-bom" wrote in message ... T. Valko pisze: One way... Array entered** : =INDEX(C1:C3,MATCH(1,IF(A1:A3=5,IF(B1:B3=6,1)),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. Thank you very much - it works perfectly. Now I know how to know make things like that. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to use a single nonrepeating XML element in a cell formula | Excel Discussion (Misc queries) | |||
look for missing element | Excel Worksheet Functions | |||
nth element extract | Excel Worksheet Functions | |||
How to define the 1st, 2nd and 3rd element | Excel Worksheet Functions | |||
How do I prevent a formula element from incrementing when copying | Excel Worksheet Functions |