Special Formatting

  • Thread starter Thread starter D
  • Start date Start date
D

D

I'd like to be able to take a 5,6,7 digit number and
adjust it according to certain rules. If the number is 5
digits I'd like it to return the Leftmost number (=Left
(cell reference,1) if it's 6 digits I'd like it to return
the Leftmost 2 numbers and if it's 7 digits I'd like it to
return the leftmost 3 numbers. I've been messing around
w/ it for awhile and don't seem to be able to get my "if"
statements correct. Perhaps I'm going about it all
wrong. Any help would be greatly appreciated, thx
beforehand!

F
 
D,

I followed up to your "Truncate Follow Up" message, since you don't appear
to be checking that, i'll post it once again!

may i suggest
=ROUND(A1/10000,0)
OR
=LEFT(A1,LEN(A1)-4)

Both will return the proper number of digits, the first will return them
rounded off and as numbers, the second will return them unrounded and as
text.

To specify the number of digits in the first change 10000 to other multiples
of 10, for the second change 4 to other numbers.

Dan E
 
Back
Top