Oct 21 2022 05:34 AM
Hello,
I have made a VBA macro that reads cell values into an array and compares with values in another array. If there is a match, an action is taken (not relevant). It works with some exceptions. Sometimes the values are identical but excel does not recognize it. Excel then shifts the value in the cell to one side. I then go in and do a manual control F search and can match the value. I have tried all sorts of cell formats, but I cannot solve the problem.
Does anyone have a clue?
carl
Oct 21 2022 05:42 AM
Oct 21 2022 06:31 AM
Can you share the code of your macro?
Oct 21 2022 06:49 AM
Hi. yes I can, but I dont think the problem is in the code. I can see the behaviour in
the cell when I place the cursor in the cell and press enter. Most of the time the content stays in place without moving. In some specific cells the content moves to the far left. @Quadruple_Pawn
Oct 21 2022 07:33 AM
Could it be that one value is a number and the other is text that looks like a number?
Oct 21 2022 07:51 AM
Thanks Hans, but that not it. I tried it. I tried different kinds of cell formatting (text, number, general). All cells have the same formatting. @Hans Vogelaar
Oct 21 2022 08:30 AM
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?