CODE function bug in dynamic array formula?

David Whitney

New Member
Joined
Sep 9, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. Web
This one has me banging my head on the desk. I am passing a stick of ANSI characters to a formula. That formula converts those chars to codes. It worked yesterday, now it fails in the strangest way -- the CODE function returns the ANSI code of the first number in the character's ANSI code, i.e. A through E return 54 because "6" is the first number in their ANSI code. It get worse. When I HSTACK the character and code arrays the codes are perfect. But when I drop the character column the codes go to hell again.

NOTE this does not happen in the grid, only inside my custom formula. Thanks for looking and I hope this isn't happening to anybody else today.

1679326989371.png
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
What is the formula?
CharArray is a vertical stick of ANSI characters. The highlighted line is where the problem occurs. It's supposed to give me 1s and 0s for matching/non-matching characters.
1679328000147.png
 
Upvote 0
Can you post the entire formula, debugging an image is not easy.
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0
Glad you sorted it & thanks for the feedback.
Thanks for the attention. I never solved it completely. This formula has run successfully hundreds of times. I pass several arrays of chars one a time and it is only unhappy with one. I worked around it by passing that one array using CHAR of the desired codes instead of pulling a character column from another output like I do for every other iteration. Quick fix but it's a kludge. I can not for the life of me figure out what is different about this one array that worked until I got my most recent Office update. It's like it's got a hidden column that makes Excel think I'm trying to do an operation on an array of arrays. The output mimics that symptom. I did a CONCAT of the char and code columns and Excel displayed the character once followed by the code twice -- that's not supposed to be possible.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top