why if function does not work?

  • Thread starter francesca.campagnoli
  • Start date
F

francesca.campagnoli

I would like to have 25% in U column when N column is 1:2:3
I used if function and it looks like this:

=IF(N6="1:2:3",U6=25%,U6="")

But it does not work.

Suggestions?
 
S

Stephen

I would like to have 25% in U column when N column is 1:2:3
I used if function and it looks like this:

=IF(N6="1:2:3",U6=25%,U6="")

But it does not work.

Suggestions?

If I understand correctly, the formula you should have in U6 is
=IF(N6="1:2:3","25%","")
 
F

francesca.campagnoli

Yes, it is correct. However, cells in column U o not show 25% when N is
1:2:3
 
B

Bob Phillips

Two things.

You don't define the target cell in the formula, you just put the formula in
that cell. So the cell U6 should contain

=IF(N6="1:2:3",25%,"")

In addition, if you enter 1:2:3 in cell N6, it will convert to time
01:02:03, which will be a real (as against what you see) value of 0.04309.
To enter it as text, precede with a single apostrophe, to force the value.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bruno Campanini

Yes, it is correct. However, cells in column U o not show 25% when N is
1:2:3

Evidentemente quell'1:2:3 non è stato inserito in N6 con ="1:2:3"
altrimenti la soluzione di Stephen funzionerabbe.

Se è stato inserito semplicemente con 1:2:3 allora, dipendendo
da come risultano definiti nel pannello di controllo
di Windows date e tempi, l'espressione "1:2:3" non è più
appropriata.

Se, come penso, 1:2:3 indica un tempo, l'espressione
diventa:
=IF(N6=TIME(1,2,3),"25%","")
dove TIME(hh,mm,ss)

Indicasse una data, sarebbe invece:
=IF(N6=DATE(2003,2,1),"25%","")
dove TIME(yyyy,mm,dd)
In tale caso però dovrebbe apparire almeno così: 1:2:2003

Ciao
Bruno
 
Top