Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jos Jos is offline
external usenet poster
 
Posts: 7
Default IF statement to calculate based on cell values

I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default IF statement to calculate based on cell values

try
=if(and(or(B17="S",B17="F"),C173),I17*K17,otherwi se)

"Jos" wrote:

I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 120
Default IF statement to calculate based on cell values

=SUMPRODUCT(((--(B17="S"))+(--(B17="F")))*--(C17=3)*(I17*K17))

+ is OR
* is AND
-- converts a TRUE to a 1

or

=IF(AND(OR(B17="S",B17="F"),C17=3),I17*K17,0)

On Jan 30, 9:17 am, Jos wrote:
I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default IF statement to calculate based on cell values

....and...another option:

=IF(AND(OR((B17={"S","F"})),C173),I17*K17,"")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Jos" wrote:

I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jos Jos is offline
external usenet poster
 
Posts: 7
Default IF statement to calculate based on cell values

Hi Ron,

many thanks for your help. It works for the clause where B17="F" and C173
but i17*k17 should apply just where b17="S" (ie. C17 doesn't have to be
greater than 3 with the value "S")

Jo x

"Ron Coderre" wrote:

...and...another option:

=IF(AND(OR((B17={"S","F"})),C173),I17*K17,"")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Jos" wrote:

I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jos Jos is offline
external usenet poster
 
Posts: 7
Default IF statement to calculate based on cell values

Hi Jason,

This works fine but the multiplaction between i17 and k17 happens just when
b17="S". The link to c17 being greater than 3 only applies when the value in
B17 ="F".

Jo xx

"Jason Lepack" wrote:

=SUMPRODUCT(((--(B17="S"))+(--(B17="F")))*--(C17=3)*(I17*K17))

+ is OR
* is AND
-- converts a TRUE to a 1

or

=IF(AND(OR(B17="S",B17="F"),C17=3),I17*K17,0)

On Jan 30, 9:17 am, Jos wrote:
I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default IF statement to calculate based on cell values

OK....how about this:

=IF(OR(B17="S",AND(B17="F",C173)),I17*K17,"")

or, maybe this
=((B17="S")+(B17="F")*(C173))*(I17*K17)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Jos" wrote:

Hi Ron,

many thanks for your help. It works for the clause where B17="F" and C173
but i17*k17 should apply just where b17="S" (ie. C17 doesn't have to be
greater than 3 with the value "S")

Jo x

"Ron Coderre" wrote:

...and...another option:

=IF(AND(OR((B17={"S","F"})),C173),I17*K17,"")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Jos" wrote:

I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jos Jos is offline
external usenet poster
 
Posts: 7
Default IF statement to calculate based on cell values

Hi Ron,

yes - thank you!

Jo xx

"Ron Coderre" wrote:

OK....how about this:

=IF(OR(B17="S",AND(B17="F",C173)),I17*K17,"")

or, maybe this
=((B17="S")+(B17="F")*(C173))*(I17*K17)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Jos" wrote:

Hi Ron,

many thanks for your help. It works for the clause where B17="F" and C173
but i17*k17 should apply just where b17="S" (ie. C17 doesn't have to be
greater than 3 with the value "S")

Jo x

"Ron Coderre" wrote:

...and...another option:

=IF(AND(OR((B17={"S","F"})),C173),I17*K17,"")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Jos" wrote:

I am trying to get a cell to run a multiplication calculation on two cells
(i17 and k17), where one cell (b17) contains a fixed value ("S") or b17
contains a fixed value ("F") AND c17 has a value greater than 3. can anyone
help me with the expression I should use?

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
Hide cell values based on a condition in another cell Cat Excel Worksheet Functions 1 January 4th 07 07:21 AM
VBA: For Count, when count changes from cell to cell LenS Excel Discussion (Misc queries) 18 January 4th 07 12:53 AM
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
if cell has date value how to calculate other cell values Excel User Excel Discussion (Misc queries) 2 August 22nd 06 01:15 AM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM


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