![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Jan 2004
Posts: 9
|
I want cell K2 to display the number in C2 if C2 matches any of the numbers in C24 through H24, otherwise leave K2 blank.
Am I close? {=IF(AND(C24:H24=C2),C2," ")} thanks |
|
|
|
|
|
#2 |
|
Join Date: Mar 2002
Posts: 292
|
you are close,
you do not need the and {=IF(C24:H24=C2,C2," ")} array entered of course HTH |
|
|
|
|
|
#3 |
|
Join Date: Jan 2003
Location: Round Rock, Texas
Posts: 564
|
=IF(COUNTIF(C24:H24,C2),C2,"")
|
|
|
|
|
|
#4 |
|
Join Date: Jan 2004
Posts: 9
|
Thanks... the COUNTIF version works!
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 39,503
|
A bit faster...
=IF(ISNUMBER(MATCH(C2,C24:H24,0)),C2,"") If C2 houses a number... =ISNUMBER(MATCH(C2,C24:H24,0))*C2 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|