# if statement?

#### slovak

##### New Member
hi, can you please help me, I need an "if" formula, but can't seem to understand the info given in most books.

I have 5 cells A-E named Distance, Time, Race time, Diff, Going

my normal calc is (D/A)*3 which gives me E

I need a formula that shows 0 in E if 0 is entered in C or else shows my original calc.

Hope you can understand my query.

regards

David B

#### dan_l

##### Active Member
=if(e1=0,0,(d1/a1)*3)

#### slovak

##### New Member
Hi Dan

many thanks for the info, it works a treat,

cheers

David B

#### slovak

##### New Member
Hi

can anyone help?

I have the following statement, which gives a result in cell A26 "=(135-(A18*10)-(A19*A20)+(SUM(A21:A24)))"

I would like to change the values of A19, if a specific number is entered

e.g. enter 12 and it would become 18 or enter 16 and it would become 24, otherwise the statement remains unaltered

Regards

David B

#### Hui

##### Excel Ninja
Staff member
@Slovak

Try A26: =(135-(A18*10)-(A20*if(A19=12,18,if(A19=16,24,A19)))+(SUM(A21:A24)))

#### slovak

##### New Member
Hi Hui

thanks for the info, just what I needed

regards

David B

#### slovak

##### New Member

how do you do a duplicate(mirror) entry to another cell(s) without copying

regards

David B

#### Hui

##### Excel Ninja
Staff member
David,

Excel doesn't have a Duplicate Function

Just plain Copy, Cut & Paste

You can Copy and then Ctrl Paste which keeps the initial object selected so you can Paste it multiple times

or Can you just go, for example =A10

Which will duplicate A10

#### slovak

##### New Member
Hi all

cell A19 can have different numbers (8, 9, 12, 16) entered, which gives me a result in A27.

If "8" is entered the resulting value remains unaltered,

if "9" is entered, "9" becomes (9*1.25).

If "12" is entered, "12" becomes (12*1.5).

If "16" is entered, "16" becomes (16*1.75).

regards

David B

#### Hui

##### Excel Ninja
Staff member
David,

Try

A27: =IF(A19=9,1.25,IF(A19=12,1.5,IF(A19=16,1.75,1)))

#### slovak

##### New Member
thanks Hui, you saved me from going round in circles,

regards

David B

#### slovak

##### New Member
I have another query,

cell A28 has this statement "=IF(A19&#60;9,"",(IF(A19&#62;=9,A19*1.5,))+A27"

what do I need to add or change, to make cell A27 blank if the value of A19&#62;=9

#### Hui

##### Excel Ninja
Staff member
if you meant A27 try this

=IF(A19&#62;=9,"",a19)

#### slovak

##### New Member
thanks Hui, you're a ****STAR****

regards

David B

#### slovak

##### New Member

my problem(can't seem to get the solution) is:

I have a list [A6*A7+A8/A9+A10], which has 2 possible totals, [CELL A12 or CELL A13] depending on the input value in [CELL 9]. If the input is &#60;9 then the total shows in [CELL A12] leaving [CELL A13 blank), NO PROBLEM, but when the value input is &#62;=9, I need a formula to make [CELL A12] blank and the result appear in [CELL A13], BUT OBVIOUSLY NEED THE TOTAL FROM {CELL A12]

#### Hui

##### Excel Ninja
Staff member
Slovak

You can use conditional formating to make the foreground and background color the same (set them both to white when A9&#62;=9), so that the value is still available for use, but it doesn't show up

#### slovak

##### New Member
Hi Hui,

YES!!! you came through once more, I should say thank you at least a million times, that's how long I've struggled with this simple (FOR YOU) solution.

David B