Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
XP XP is offline
external usenet poster
 
Posts: 389
Default Sum if match any six numbers

Hi,

I need an array function such that:

Sum(If( G2:G5836 = <any six numeric digits, I2:I5836,0))

Obviously, I need the part on how to match any six numeric digits (e.g.
123456) in the above formula, can someone please help me out on this?

Thanks much in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Sum if match any six numbers

Try:

=SUM(IF(ISNUMBER(G2:G5836)*LEN(G2:G5836)=6, I2:I5836,0))

Array entered with Ctrl + Shift + Enter or:

=SUMPRODUCT((ISNUMBER(G2:G5836)*(LEN(G2:G5836)=6)* I2:I5836))

Normally entered


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"XP" wrote in message
...
Hi,

I need an array function such that:

Sum(If( G2:G5836 = <any six numeric digits, I2:I5836,0))

Obviously, I need the part on how to match any six numeric digits (e.g.
123456) in the above formula, can someone please help me out on this?

Thanks much in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Sum if match any six numbers

"Sandy Mann" wrote...
Try:

....
=SUMPRODUCT((ISNUMBER(G2:G5836)*(LEN(G2:G5836)=6) *I2:I5836))

....

Would include -87654, 12.345, etc. Try instead

=SUMPRODUCT((G2:G5836=100000)*(G2:G5836<=999999)
*(G2:G5836=INT(G2:G5836)),I2:I5836)

Rule of thumb: NEVER use text operations on numeric data if there's an
equivalent arithmetic operation.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Sum if match any six numbers

Would include -87654, 12.345, etc
Very true. That's why I frequent these NG's - to try to keep the Alzheimer's
at bay.

Thank you for pointing it out.

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Harlan Grove" wrote in message
...
"Sandy Mann" wrote...
Try:

...
=SUMPRODUCT((ISNUMBER(G2:G5836)*(LEN(G2:G5836)=6 )*I2:I5836))

...

Would include -87654, 12.345, etc. Try instead

=SUMPRODUCT((G2:G5836=100000)*(G2:G5836<=999999)
*(G2:G5836=INT(G2:G5836)),I2:I5836)

Rule of thumb: NEVER use text operations on numeric data if there's an
equivalent arithmetic operation.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Sum if match any six numbers

Try this:
=SUMPRODUCT(--(A2:A10=123),--(B2:B10=456),--(C2:C10=789),--(D2:D10=1011),--(E2:E10=1213),--(F2:F10=1415),G2:G10)

I think you can have up to 30 columns.

See this for more info.:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Regards,
Ryan---
--
RyGuy


"XP" wrote:

Hi,

I need an array function such that:

Sum(If( G2:G5836 = <any six numeric digits, I2:I5836,0))

Obviously, I need the part on how to match any six numeric digits (e.g.
123456) in the above formula, can someone please help me out on this?

Thanks much in advance.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sum if match any six numbers

Well, you can still spell it, Sandy, so it must be working for you.
<bg

Pete

On Jun 23, 10:32*pm, "Sandy Mann" wrote:
That's why I frequent these NG's - to try to keep the Alzheimer's at bay.

Thank you for pointing it out.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Sum if match any six numbers

Hi,
Perhaps this:
=IF(SUMPRODUCT(--(LEN(G2:G5836)=6)*(ISNUMBER(G2:G5836)))=1,I2:I5836 ,0)
Array entered.
Regards - Dave.
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 match between same numbers ghost Excel Discussion (Misc queries) 1 November 26th 07 02:24 PM
how can I match numbers from two columns? Lea Excel Worksheet Functions 1 September 26th 05 09:16 AM
how can I match numbers from two columns? Lea Excel Worksheet Functions 1 September 26th 05 09:11 AM
How can I match numbers from two columns? Lea Excel Discussion (Misc queries) 2 September 26th 05 08:04 AM
How to find MATCH numbers ? toyota58 Excel Worksheet Functions 8 September 20th 05 09:33 AM


All times are GMT +1. The time now is 06:35 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"