Thread: Reversing bytes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Reversing bytes

You can use DEC2BIN() to convert the value to a bit string(s), then use
MID()'s to separate the individual bits. Apply a conversion algorithm and
then re-construct the bits.
--
Gary''s Student - gsnu200731


"simonc" wrote:

I'm reading 16bit integers from a binary file and putting the values into a
spreadsheet. Unfortunately the binary file is big-endian, so all my extracted
integer values are wrong. What is the neatest way of reversing the bytes then
converting the number to an integer?

Grateful for help.