Forum Discussion
Why does REDUCE Function gives VALUE Error
So I am trying to extract the cities from the string, though I have resolved the issue, with an alternative formula, but my reason to ask this query, is that, I was earlier trying to use the REDUCE() Function to substitute multiple characters all at once, but it always gave me #VALUE! Error.
I am not able to understand or figure out, why I am getting this error, can anyone please let me know. Kindly refer the screenshot and markdown data as well, https://1drv.ms/x/s!AlEkksoPTc2chiMZHvUKkgK2gjCv?e=WIAWDF
| 2000 Orange Ave, Ste 650 Winter Park, FL 56789 | | 5665 S Broadway St Pittsburg, KS 65662 | | 1 DTC Parkway, Ste 700 Greenwood Village, CO 45111 | | 4545 Hyde Park Blvd., Houston, TX 74506 | | 5668 Lake Center Plaza #206 Potomac Falls, VA 41516 | | 898989 Worthington Blvd Frederick, MD 21564 | | D-46548 Wolfe St, 3rd, Floor. Fredericksburg, VA 24501 | | 100-D Foam St Ste B2, Monterey, CA 93954 | | 300 Cushman St. Suite 501, Fairbanks, AK 99451 | | 450 E Hopkins Ave, Ste 302 Aspen, CO 84511 | |
• Formula used in cell B1
=REDUCE(A1,{",","-","."},LAMBDA(x,y,SUBSTITUTE(x,y,"")))
• While I used to extract the cities, in cell C1
=LET(x,IFERROR(TAKE(TEXTSPLIT(TRIM(SUBSTITUTE(A1,RIGHT(A1,10),"")),{" ",",","-",".","Ave","Ste","St","Drive","Floor","Blvd"}),,-2),""), TEXTJOIN(" ",1,FILTER(x,NOT(ISNUMBER(--x)),"")))
Thank you very much for guidance !
Please see .gif
27 Replies
- Patrick2788Silver Contributor
Tested here:
Excel web - OK
Excel desktop - OK
No #VALUE! errors. Using comma as list separator.I do recall something vaguely similar with a simple MAP formula that was producing a #VALUE! error. I thought maybe I was spending too much time looking at the screen because the formula had been working then broke on re-calc. Haven't seen that one come back.
- SergeiBaklanDiamond Contributor
I have no errors if open the file in my locale
Perhaps you have another list separator, e.g. semicolon instead of comma
- Mayukh_BhattacharyaIron ContributorNo Sir, I use comma only. You can see the .gif it is not working, if you open the excel workbook then on sheet 2 also i created some random text where it is not working, very strange and weird
- SergeiBaklanDiamond Contributor
Are you on Excel Desktop or Excel for Web? If the latest, which regional settings do you use?
If you open the file attached to the previous post do you have errors? I have no ones in both sheets.