LOL - Honestly Bruno, I'd forgot about the """" thing - It's just something I do now.
"""" is just a way of saying you're looking for a Single ". The first two pretty much cancel each other out and so "- becomes the string you are looking for as it's followed by another ".
I'd be lying if I said I understood this completely, it's just something I'm used to doing now and that's how it is in my head.
So, looking at your '00000266123,"5534.****.****.0123","B.A. FERNANDES RODRIGUES","2022-06-08","2022-06-09","Sligro Zb 5024 Rotterdam NLD","","","","-401,73'
There are no other instances of "- so that's something I can look for to get your number.
So, I use '=FIND("""-",A1)' to get me the position of 128 which is actually just the " - But does give me the starting point of "- so I need to use '=FIND("""-",A1)+1' to get me to position 129 and the -
What Excel is seeing so far is;
=MID(A1,FIND("""-",A1)+1,LEN(A1)-FIND("""-",A1)-1)
=MID(A1,129
To get the number I don't need to know where the ',' is at all, I think you might have misunderstood something there about what the Formula is doing
To get the full number I need to know how far away is is from the end to get the number of characters I need, so I use LEN(A1) to get me 136 and then I take off the number of characters to "- which is 128
136 -128 allows me to get to how many characters there are left in the string after "- which is of course 8
=MID(A1,FIND("""-",A1)+1,LEN(A1)-FIND("""-",A1)-1)
=MID(A1,129,8 (136-128)
I know there is the " at the end of the string so I actually want one less then 8, which is 7 so I do the -1 at the end.
So we end up with Excel seeing;
I hope that makes sense now?
Bookmarks