Nwlapcug.com


Come utilizzare la funzione TRUNC di Excel

Funzione di Excel TRUNC tronca un numero a un numero di cifre specificato e restituisce il numero risultante. È importante distinguere TRUNC con INT e ROUND. TRUNC restituirà #VALUE! Se test_number non è un numero. La procedura seguente mostrerà come utilizzare la funzione TRUNC di Excel.

Istruzioni

1

Imparare la sintassi per TRUNC. Si tratta di TRUNC (test_number, number_of_digits) dove test_number è il numero da troncare e number_of_digits specifica la precisione del troncamento. Il valore predefinito per number_of_digits è pari a zero.

2

Rimuovere la parte frazionaria di un numero per renderlo un valore integer che specifica 0 per number_of_digits o omettendo number_of_digits interamente.

3

Confrontare questo uso di TRUNC con INT. Essi sono simili in quanto entrambi restituiscono interi ma INT arrotonda un numero per difetto all'intero più vicino. Questo fa solo una differenza quando il numero è negativo. Ad esempio, restituisce -5, TRUNC(-5.45) ma INT restituisce -6 perché -6 è il numero inferiore.

4

Distinguere tra TRUNC e ROUND. TRUNC(7.45,1) = 7,4 e ROUND(7.45,1) = 7.5.

5

Guarda alcuni esempi di come funziona il TRUNC senza una number_of_digits specificato:

TRUNC(7.821) = 7. Il test_number di 7.821 viene troncato a 7.
TRUNC(-9.21) = -9. Test_number-9 viene troncato a -9.

6

Esaminare alcuni esempi di come TRUNC funziona utilizzando un number_of_digits specificato:

TRUNC(7.821,2) = 7,82. Il test_number di 7.821 viene troncato a 7,82.
TRUNC(-9.21,1) = -9,2. Il test_number di-9.21 viene troncato a -9,2.
TRUNC(7.29,1) = 7.2. Si noti come 7.29 è troncato a 7.2 e non arrotondato 7.3.