Can I just say that this is for certain the best solution I have seen to accomplish this. Did not know that you could do that. <tip hat>
On Wednesday, February 19, 2020 15:16 EST, Johnny Rosenberg <gurus.knu...@gmail.com> wrote: Den ons 19 feb. 2020 kl 21:08 skrev Johnny Rosenberg <gurus.knu...@gmail.com >: > Den ons 19 feb. 2020 kl 10:09 skrev Andrea Vt <andrea...@gmx.ch>: > >> Hi all :-) >> >> Is there a way to show a number as binary with a separation? >> > Yes, there seems to be. > >> >> E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010) >> >> Thanks and have a nice day >> > Have a nice day you too. > > > And maybe I should answer the question I think you meant to ask too: ”How?” > > Here's one way. I don't have Apache OpenOffice so I can't test it, but I > tested it with LibreOffice and I think it would work in Apache OpenOffice > too: > =VALUE(BASE(42;2)) > Now format the cell like the following: > Right click the cell → click Format cells… > Select the Number tab. > In the field ”Format description”, enter the following: > 0000" "0000 > Hit OK. > > Note that if omitting the quotes, typing 0000 0000 in that field will > fail, (the cell will display 00 101 010). I'm not sure why though. > As I said, I tested this in LibreOffice, hopefully it will work in Apache > OpenOffice too. > > > Kind regards > > Johnny Rosenberg > After some more experimenting I found this way, that differs from the other method in the following ways: - No need for using cell formatting - The cell content is a string rather than a number And the cell formula looks like this: =TEXT(VALUE(BASE(42;2));"0000"" ""0000") Of course you should replace ”42” with a cell reference or a formula in most cases, like this: =TEXT(VALUE(BASE(A1;2));"0000"" ""0000") Sorry for stating the obvious… 😁 Kind regards Johnny Rosenberg > > > > >> Andrea >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org >> For additional commands, e-mail: users-h...@openoffice.apache.org >> >>