Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a spreadsheet with column B having integers. I want to get the first digit of each entry in column B in the corresponding row of column C.

share|improve this question
    
By integers, do you mean there are some negative values? –  Excellll Jul 14 '12 at 4:35
add comment

2 Answers

If you want them as numbers for calculation to be done

=VALUE(LEFT(B1,1))

drag that down in Column C else

=LEFT(B1,1)
share|improve this answer
add comment

To build on @datatoo's answer, if your list includes negative values, you'll have to add a condition to look past any negative signs:

=VALUE(IF(B1<0,MID(B1,2,1),LEFT(B1,1)))
share|improve this answer
1  
you COULD just take the absolute value of the cell first. abs() –  lornix Jul 14 '12 at 20:10
    
@lornix Or that.... :P –  Excellll Jul 15 '12 at 4:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.