Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Different cells that need to sum in one

I have one cell that needs to contain the possible sum of cell
(A1*B1) or (C1*D1) or (E1*F1) but only one of the 3 possibles
For example :
A1 is $10.00 B1 is QTY 1 Sum is $10.00
C1 is $8.00 D1 is QTY 1 Sum is $8.00
E1 is $7.00 F1 is QTY 1 Sum is $7.00

Also would be nice if I could allow only 2 of the cells to contain numbers
at a time
(A1 and B1) or (C1 And D1) ETC and not allow more than one set to give the
sum


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Different cells that need to sum in one

--You can try the below formula. (all in one line)

=IF(COUNT(A1:B1)=2,A1*B1,IF(COUNT(C1:D1)=2,C1*D1,
IF(COUNT(E1:F1)=2,E1*F1,0)))

--Also to make sure you have only two numbers entered you can set data
validation for this range.. Select A1:F1 . From menu DataValidationselect
'Custom' and copy paste the below formula.

=COUNT($A$1:$F$1)<3

If this post helps click Yes
---------------
Jacob Skaria


"Cbdavis" wrote:

I have one cell that needs to contain the possible sum of cell
(A1*B1) or (C1*D1) or (E1*F1) but only one of the 3 possibles
For example :
A1 is $10.00 B1 is QTY 1 Sum is $10.00
C1 is $8.00 D1 is QTY 1 Sum is $8.00
E1 is $7.00 F1 is QTY 1 Sum is $7.00

Also would be nice if I could allow only 2 of the cells to contain numbers
at a time
(A1 and B1) or (C1 And D1) ETC and not allow more than one set to give the
sum


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Different cells that need to sum in one

That worked Great !
What if I want to continue that formula in the next rows below that
throughout the sheet?



"Jacob Skaria" wrote:

--You can try the below formula. (all in one line)

=IF(COUNT(A1:B1)=2,A1*B1,IF(COUNT(C1:D1)=2,C1*D1,
IF(COUNT(E1:F1)=2,E1*F1,0)))

--Also to make sure you have only two numbers entered you can set data
validation for this range.. Select A1:F1 . From menu DataValidationselect
'Custom' and copy paste the below formula.

=COUNT($A$1:$F$1)<3

If this post helps click Yes
---------------
Jacob Skaria


"Cbdavis" wrote:

I have one cell that needs to contain the possible sum of cell
(A1*B1) or (C1*D1) or (E1*F1) but only one of the 3 possibles
For example :
A1 is $10.00 B1 is QTY 1 Sum is $10.00
C1 is $8.00 D1 is QTY 1 Sum is $8.00
E1 is $7.00 F1 is QTY 1 Sum is $7.00

Also would be nice if I could allow only 2 of the cells to contain numbers
at a time
(A1 and B1) or (C1 And D1) ETC and not allow more than one set to give the
sum


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Different cells that need to sum in one

--Copy the IF() formula down..

--Select the range and set the data validation...Slight change in the formula
=COUNT($A1:$F1)<3

If this post helps click Yes
---------------
Jacob Skaria


"Cbdavis" wrote:

That worked Great !
What if I want to continue that formula in the next rows below that
throughout the sheet?



"Jacob Skaria" wrote:

--You can try the below formula. (all in one line)

=IF(COUNT(A1:B1)=2,A1*B1,IF(COUNT(C1:D1)=2,C1*D1,
IF(COUNT(E1:F1)=2,E1*F1,0)))

--Also to make sure you have only two numbers entered you can set data
validation for this range.. Select A1:F1 . From menu DataValidationselect
'Custom' and copy paste the below formula.

=COUNT($A$1:$F$1)<3

If this post helps click Yes
---------------
Jacob Skaria


"Cbdavis" wrote:

I have one cell that needs to contain the possible sum of cell
(A1*B1) or (C1*D1) or (E1*F1) but only one of the 3 possibles
For example :
A1 is $10.00 B1 is QTY 1 Sum is $10.00
C1 is $8.00 D1 is QTY 1 Sum is $8.00
E1 is $7.00 F1 is QTY 1 Sum is $7.00

Also would be nice if I could allow only 2 of the cells to contain numbers
at a time
(A1 and B1) or (C1 And D1) ETC and not allow more than one set to give the
sum


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Different cells that need to sum in one

I can not get the validation to work correctly.

It will not allow me to enter any value when I use the function below
=COUNT($A$1:$F$1)<3

Is it because there are cells in between the range I am using?
I would like to have data entered in either F7, H7or J7
There is data in E7, G7 and I7 already

"Jacob Skaria" wrote:

--You can try the below formula. (all in one line)

=IF(COUNT(A1:B1)=2,A1*B1,IF(COUNT(C1:D1)=2,C1*D1,
IF(COUNT(E1:F1)=2,E1*F1,0)))

--Also to make sure you have only two numbers entered you can set data
validation for this range.. Select A1:F1 . From menu DataValidationselect
'Custom' and copy paste the below formula.

=COUNT($A$1:$F$1)<3

If this post helps click Yes
---------------
Jacob Skaria


"Cbdavis" wrote:

I have one cell that needs to contain the possible sum of cell
(A1*B1) or (C1*D1) or (E1*F1) but only one of the 3 possibles
For example :
A1 is $10.00 B1 is QTY 1 Sum is $10.00
C1 is $8.00 D1 is QTY 1 Sum is $8.00
E1 is $7.00 F1 is QTY 1 Sum is $7.00

Also would be nice if I could allow only 2 of the cells to contain numbers
at a time
(A1 and B1) or (C1 And D1) ETC and not allow more than one set to give the
sum


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
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
join data in multiple cells when adjoining cells match criteria ?? angiec50 Excel Worksheet Functions 1 October 6th 09 10:27 AM
Cells won't change font color or show hi-lighted cells in document ROBIN Excel Discussion (Misc queries) 1 March 27th 08 09:39 PM
Setting of input cells as blue font and formula cells as black fon Sunnyskies Excel Discussion (Misc queries) 2 May 14th 07 05:27 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM


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