Forum Discussion
Sven_Tholstrom
Oct 05, 2023Copper Contributor
Trying to find average and getting #D/0 error
I have been trying to find the average of a column and I keep getting this error but when I try on the columns without dollar signs it works, I have tried to change it from the dollar sign but it wont let me change it from the data I was given that i copied into excel
4 Replies
- PeterBartholomew1Silver Contributor
If you keep on needing to import dollar values as text and use 365, you could write a Lambda function to perform the calculation you need on the text values.
AverageTextλ = LAMBDA(text, LET( convertedToValue, VALUE(TEXTAFTER(text, "$")), averageOfValues, AVERAGE(convertedToValue), reconvertToText, TEXT(averageOfValues, "$0"), reconvertToText ) )
- Riny_van_EekelenPlatinum Contributor
Sven_Tholstrom I suspect that the amounts with dollar signs are texts, not numbers. Then AVERAGE will generate the #DIV/0! error.
Try using Find & Replace (Ctrl-H) to replace $ with nothing. That should turn the values into numbers and AVERAGE will work as intended.
- SanthoshKunderIron ContributorIf you can execute a Find & Replace for "$," it indicates that the "$" symbol wasn't added through formatting, but rather entered manually.. You can replace $ symbol and subsequently adjust the data type to currency from format dialog box in order to preserve the currency formatting.
- SanthoshKunderIron ContributorAre you attempting to perform a division with non-zero by a Zero?