Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi, I have a spreadsheet where cells B3:B850 show names of countries. I have a list of 22 priority nations and would like a formula to count the total number of occurances. I can count it my counting each of the 22 nations and adding this together, but can this be done in a single formula? I am using Excel 97. Thanks for any assistance. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way ..
Assuming the priority list of 22 nations is in D1:D22, try in say, E1: =SUMPRODUCT(--ISNUMBER(MATCH(B3:B850,D1:D22,0))) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "DKerr" wrote in message ... Hi, I have a spreadsheet where cells B3:B850 show names of countries. I have a list of 22 priority nations and would like a formula to count the total number of occurances. I can count it my counting each of the 22 nations and adding this together, but can this be done in a single formula? I am using Excel 97. Thanks for any assistance. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Works perfectly, but I have another issue, when I was trying to do this myself I was trying to modify an array formula I use elsewhere in the spreadsheet =SUM(IF($B$3:$B$850='Static data'!$G$7,IF($O$3:$O$850=3,1,0))) I tried to change "$G$7" to "$G$7:$G29". Using your sumproduct formula how do I incorporate the "IF($O$3:$O$850=3,1,0)))" bit, The O column has the week number so the above formula would count for week 3. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Try =SUMPRODUCT(--ISNUMBER(MATCH(B3:B850,'static data'!G7:G29,0)),--(O3:O850=3)) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() daddylonglegs Wrote: Try =SUMPRODUCT(--ISNUMBER(MATCH(B3:B850,'static data'!G7:G29,0)),--(O3:O850=3)) I get an #N/A when I try that. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Not sure why, but daddylonglegs's suggestion should have worked
Another variation: =SUMPRODUCT((ISNUMBER(MATCH(B3:B850,'Static data'!G7:G28,0))*(O3:O850=3))) Above carries a slight amendment to the range: G7:G28 (to correspond to 22 cells) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "DKerr" wrote in message ... daddylonglegs Wrote: Try =SUMPRODUCT(--ISNUMBER(MATCH(B3:B850,'static data'!G7:G29,0)),--(O3:O850=3)) I get an #N/A when I try that. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() My mistake, Column O contains a formula to calculate the week number like in cell O3 =VLOOKUP(F3,'Static data'!$B$4:$C$34,2,FALSE) This showed an #N/A value in rows that were imcomplete, this caused the #N/A value. I've changed the VLOOKUP to =IF($F3=0,"",VLOOKUP(F3,'Static data'!$B$4:$C$34,2,FALSE)) To remove the #N/A value, and everything is fine, thanks all for the help. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() My mistake, Column O contains a formula to calculate the week number like in cell O3 =VLOOKUP(F3,'Static data'!$B$4:$C$34,2,FALSE) This showed an #N/A value in rows that were imcomplete, this caused the #N/A value. I've changed the VLOOKUP to =IF($F3=0,"",VLOOKUP(F3,'Static data'!$B$4:$C$34,2,FALSE)) To remove the #N/A value, and everything is fine, thanks all for the help. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Glad you got it sorted out / working !
-- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "DKerr" wrote in message ... My mistake, Column O contains a formula to calculate the week number like in cell O3 =VLOOKUP(F3,'Static data'!$B$4:$C$34,2,FALSE) This showed an #N/A value in rows that were imcomplete, this caused the #N/A value. I've changed the VLOOKUP to =IF($F3=0,"",VLOOKUP(F3,'Static data'!$B$4:$C$34,2,FALSE)) To remove the #N/A value, and everything is fine, thanks all for the help. -- DKerr ------------------------------------------------------------------------ DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087 View this thread: http://www.excelforum.com/showthread...hreadid=515253 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula for counting number of cells | Excel Discussion (Misc queries) | |||
Match then lookup | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula for counting specific cells with value greater than 0 | Excel Discussion (Misc queries) | |||
Formula for counting specific cells which are greater than 1 | Excel Discussion (Misc queries) |