#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default logical function

Let me start by saying I am fairly new to logical functions. I have
searched a bit on this and was unable to locate an answer to the
function i would like to do.

what i would like to have a function do is add all in a row if text in
an colum is true.

here is some sample data

a b c
1cash $5.00 $45.00
2cash $45.00
3check $35.00
4credit $50.00

what i need to happen is if col a=cash then add b#+c#. This function
would need to hold true for the entire colum in the one cell.

with going off this sample data i have provided i want 1 cell to add
b1, c1, b2, c2 together because they have 'cash' is the col of 'a'

1 more note this needs to work with upto 25 rows.

Now i know i have not explained myself all that well and for that i
appologize for that. If there is any other info you need from me please
feel free to ask.

Thanks
-TheChef420

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default logical function

First of all i thank you for your reply. I greatly appreciate it. And
yeah i know what i said was a little confusing.

Looking at your array it logicly looks like it is what i am after. "IF
any item in a1-a4 equals "cash" then sum b row#,c row#" However it does
not seem to add the amounts together.

with the data:

cash $5.00 $35.00
check $35.00
credit $10.00 $25.00
cash $5.00 $45.00

and the function: =SUMPRODUCT((A1:A4="cash"),(B1:B4)+(C1:C4))

It is returning an amount of '0' It should have an amount '90'

I get the same result no matter what spreadsheet program i use. Excel
2003/open office 2.0

Another question.. Is an array what i need or a logical function?


Again thank you for your help

-TheChef420

Franz Verga wrote:
wrote:
Let me start by saying I am fairly new to logical functions. I have
searched a bit on this and was unable to locate an answer to the
function i would like to do.

what i would like to have a function do is add all in a row if text in
an colum is true.

here is some sample data

a b c
1cash $5.00 $45.00
2cash $45.00
3check $35.00
4credit $50.00

what i need to happen is if col a=cash then add b#+c#. This function
would need to hold true for the entire colum in the one cell.

with going off this sample data i have provided i want 1 cell to add
b1, c1, b2, c2 together because they have 'cash' is the col of 'a'

1 more note this needs to work with upto 25 rows.

Now i know i have not explained myself all that well and for that i
appologize for that. If there is any other info you need from me
please feel free to ask.

Thanks
-TheChef420


I'm not sure to have well understood what you mean, but I think you could
use a function like this:

=SUMPRODUCT((A1:A25="cash"),(B1:B25)+(C1:C25))

Adapt the ranges to your needs

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 459
Default logical function

Try in this way:

=SUMPRODUCT((A1:A4="cash")*((B1:B4)+(C1:C4)))


wrote:
First of all i thank you for your reply. I greatly appreciate it. And
yeah i know what i said was a little confusing.

Looking at your array it logicly looks like it is what i am after. "IF
any item in a1-a4 equals "cash" then sum b row#,c row#" However it
does not seem to add the amounts together.

with the data:

cash $5.00 $35.00
check $35.00
credit $10.00 $25.00
cash $5.00 $45.00

and the function: =SUMPRODUCT((A1:A4="cash"),(B1:B4)+(C1:C4))

It is returning an amount of '0' It should have an amount '90'

I get the same result no matter what spreadsheet program i use. Excel
2003/open office 2.0

Another question.. Is an array what i need or a logical function?


Again thank you for your help

-TheChef420

Franz Verga wrote:
wrote:
Let me start by saying I am fairly new to logical functions. I have
searched a bit on this and was unable to locate an answer to the
function i would like to do.

what i would like to have a function do is add all in a row if text
in an colum is true.

here is some sample data

a b c
1cash $5.00 $45.00
2cash $45.00
3check $35.00
4credit $50.00

what i need to happen is if col a=cash then add b#+c#. This function
would need to hold true for the entire colum in the one cell.

with going off this sample data i have provided i want 1 cell to add
b1, c1, b2, c2 together because they have 'cash' is the col of 'a'

1 more note this needs to work with upto 25 rows.

Now i know i have not explained myself all that well and for that i
appologize for that. If there is any other info you need from me
please feel free to ask.

Thanks
-TheChef420


I'm not sure to have well understood what you mean, but I think you
could use a function like this:

=SUMPRODUCT((A1:A25="cash"),(B1:B25)+(C1:C25))

Adapt the ranges to your needs

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default logical function

grazie tanto

baci ;-)


Thank you much. I greatly appreciate it. It works perfectly!


Franz Verga wrote:
Try in this way:

=SUMPRODUCT((A1:A4="cash")*((B1:B4)+(C1:C4)))


wrote:
First of all i thank you for your reply. I greatly appreciate it. And
yeah i know what i said was a little confusing.

Looking at your array it logicly looks like it is what i am after. "IF
any item in a1-a4 equals "cash" then sum b row#,c row#" However it
does not seem to add the amounts together.

with the data:

cash $5.00 $35.00
check $35.00
credit $10.00 $25.00
cash $5.00 $45.00

and the function: =SUMPRODUCT((A1:A4="cash"),(B1:B4)+(C1:C4))

It is returning an amount of '0' It should have an amount '90'

I get the same result no matter what spreadsheet program i use. Excel
2003/open office 2.0

Another question.. Is an array what i need or a logical function?


Again thank you for your help

-TheChef420

Franz Verga wrote:
wrote:
Let me start by saying I am fairly new to logical functions. I have
searched a bit on this and was unable to locate an answer to the
function i would like to do.

what i would like to have a function do is add all in a row if text
in an colum is true.

here is some sample data

a b c
1cash $5.00 $45.00
2cash $45.00
3check $35.00
4credit $50.00

what i need to happen is if col a=cash then add b#+c#. This function
would need to hold true for the entire colum in the one cell.

with going off this sample data i have provided i want 1 cell to add
b1, c1, b2, c2 together because they have 'cash' is the col of 'a'

1 more note this needs to work with upto 25 rows.

Now i know i have not explained myself all that well and for that i
appologize for that. If there is any other info you need from me
please feel free to ask.

Thanks
-TheChef420

I'm not sure to have well understood what you mean, but I think you
could use a function like this:

=SUMPRODUCT((A1:A25="cash"),(B1:B25)+(C1:C25))

Adapt the ranges to your needs

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy




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
wild card with if logical function b166er Excel Worksheet Functions 2 May 30th 06 11:20 AM
Custom function Christina L. Excel Worksheet Functions 1 May 10th 06 06:38 PM
Logical Function Question jgp_2 Excel Worksheet Functions 2 September 28th 05 07:24 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM
using logical functions as criteria with the SUMIF function pfdubz Excel Worksheet Functions 6 December 1st 04 07:40 PM


All times are GMT +1. The time now is 03:51 PM.

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"