23.08.2023 Views

CFI-Excel-eBook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Corporate Finance Institute Excel

3. SUMPRODUCT Formula and ABS Function

The SUMPRODUCT function allows us to include the ABS function to provide

absolute numbers. Suppose we are given the following data. If we would just

use the SUMPRODUCT formula, we would get a negative number as shown

below:

However, using ABS Function, we can get the absolute number as result. The

formula to be used would be:

To learn more, launch our free Excel crash course now!

ABS as a VBA Function

If we wish to use the ABSOLUTE function in Excel VBA code, it can be used in

the following manner. Let’s assume I need ABS of -600 so the code would be:

Dim LNumber As Double

LNumber = ABS(-600)

Now in the above code, the variable known as LNumber would now contain the

value of 600.

corporatefinanceinstitute.com

161

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!