Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Celt
 
Posts: n/a
Default SUMIF & TRUNC question


I am working with the formula below.

=SUMIF('Input 505 & 506'!$C$5:$C$63,$A6,'Input 505 & 506'!$D$5:$D$63)

It is comparing alpha characters and when it finds a match, it is
pulling a number that is sitting in a third column.

Some of the numbers may have decimals in them and I want this formula
to pull the number without any decimals. I would like to "round" the
number prior to it being pulled and summed. I know I can use:

{=SUM(TRUNC('Input 505 & 506'!$D$5:$D$63))} an array
or
=SUMPRODUCT(TRUNC('Input 505 & 506'!$D$5:$D$63))

Is there anyway to squeeze this into the 3rd argument of my SUMIF
function? I've not had any luck so far....


--
Celt
------------------------------------------------------------------------
Celt's Profile: http://www.excelforum.com/member.php...o&userid=19413
View this thread: http://www.excelforum.com/showthread...hreadid=519792

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default SUMIF & TRUNC question

No, you have found the alternatives.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Celt" wrote in message
...

I am working with the formula below.

=SUMIF('Input 505 & 506'!$C$5:$C$63,$A6,'Input 505 & 506'!$D$5:$D$63)

It is comparing alpha characters and when it finds a match, it is
pulling a number that is sitting in a third column.

Some of the numbers may have decimals in them and I want this formula
to pull the number without any decimals. I would like to "round" the
number prior to it being pulled and summed. I know I can use:

{=SUM(TRUNC('Input 505 & 506'!$D$5:$D$63))} an array
or
=SUMPRODUCT(TRUNC('Input 505 & 506'!$D$5:$D$63))

Is there anyway to squeeze this into the 3rd argument of my SUMIF
function? I've not had any luck so far....


--
Celt
------------------------------------------------------------------------
Celt's Profile:

http://www.excelforum.com/member.php...o&userid=19413
View this thread: http://www.excelforum.com/showthread...hreadid=519792



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Celt
 
Posts: n/a
Default SUMIF & TRUNC question


I got it....

instead of trying to "round" in this function, which doesn't work...or
I just haven't found the right combo yet..
=SUMIF('Input 505 & 506'!$C$5:$C$63,$A6,'Input 505 & 506'!$D$5:$D$63)

this one works just fine.
=SUMPRODUCT(--('Input 505 & 506'!$C$5:$C$63=$A6),TRUNC('Input 505 &
506'!$D$5:$D$63))


--
Celt
------------------------------------------------------------------------
Celt's Profile: http://www.excelforum.com/member.php...o&userid=19413
View this thread: http://www.excelforum.com/showthread...hreadid=519792

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default SUMIF & TRUNC question

You could try the following array entered formula:
=SUM(IF($B$12:$B$16="blah",INT($A$12:$A$16),0))
or since you are familiar with sumproduct ...
=SUMPRODUCT(--($B$12:$B$16="blah"),--INT($A$12:$A$16))
If you want to replace int with trunc, feel free.
--
Kevin Vaughn


"Celt" wrote:


I am working with the formula below.

=SUMIF('Input 505 & 506'!$C$5:$C$63,$A6,'Input 505 & 506'!$D$5:$D$63)

It is comparing alpha characters and when it finds a match, it is
pulling a number that is sitting in a third column.

Some of the numbers may have decimals in them and I want this formula
to pull the number without any decimals. I would like to "round" the
number prior to it being pulled and summed. I know I can use:

{=SUM(TRUNC('Input 505 & 506'!$D$5:$D$63))} an array
or
=SUMPRODUCT(TRUNC('Input 505 & 506'!$D$5:$D$63))

Is there anyway to squeeze this into the 3rd argument of my SUMIF
function? I've not had any luck so far....


--
Celt
------------------------------------------------------------------------
Celt's Profile: http://www.excelforum.com/member.php...o&userid=19413
View this thread: http://www.excelforum.com/showthread...hreadid=519792


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Celt
 
Posts: n/a
Default SUMIF & TRUNC question


Thanks for the help everyone!!!


--
Celt
------------------------------------------------------------------------
Celt's Profile: http://www.excelforum.com/member.php...o&userid=19413
View this thread: http://www.excelforum.com/showthread...hreadid=519792

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
SUMIF Question Brig Siton Excel Worksheet Functions 3 January 25th 06 05:16 PM
Sumif question J Shrimps, Jr. Excel Worksheet Functions 5 January 20th 06 05:26 PM
SUMIF question with multiple criteria Gretchster Excel Worksheet Functions 2 November 10th 05 06:41 PM
SUMIF Question CLR Excel Discussion (Misc queries) 13 September 20th 05 01:08 AM
SUMIF question CarlosAntenna Excel Worksheet Functions 2 February 23rd 05 06:38 PM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"