# Calculating a value base on senarios

#### NZAS

##### Board Regular
Hi

I need some help for a formula to do some caclculations.
Cell A1 has a value xxx at times
Cell A2 has a value xxx at times
There are time when only one of these cell could have a value in them. The formula I am looking for is
If cell A1 or A2 has a value multply value in cell multply by 1 ie a value in either cell not both

If cell A2 has value and cell A1 has value the multply cell C1 by 2 and add to A1 or A2 value

These are the likly senarios

 Senarios cell A1 23 10 cell A2 10 10 Cell C1 17 17 17 Here cell C1 is multiplied 34 17 17 Add cell c1 to A1 and or A2 depending on if values in cell A4 cell 67 27 27

<tbody>
</tbody><colgroup><col><col span="3"></colgroup>

Answer A4 67 27 27 Need the formula in cell A4

Cheers
NZAS

Last edited:

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

#### Marcelo Branco

##### MrExcel MVP
Maybe...

A4
=IF(COUNT(A1:A2)=2,2*C1+SUM(A1:A2),C1+SUM(A1:A2))

M.

#### NZAS

##### Board Regular
Thankyou M
That has work great for me
Cheers
NZAS

#### Marcelo Branco

##### MrExcel MVP
You are welcome. Thanks for the feedback.

M..

Replies
1
Views
11
Replies
3
Views
41
Replies
4
Views
52
Replies
2
Views
49
Replies
8
Views
58