General discussion


Execel and Regular Expressions

By maru3445 ·
I have an excel spreadsheet in which the first column of every row contains a 8 digit number. I would like to somehow auto-populate the last column of each row with the first digit of the number in the first column in that row. Is this possible, if so, how? I was thinking of regular expressions, but I don't know if those are applicable in Excel.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by chitosunday In reply to Execel and Regular Expres ...

to get the first number in cell a1 the formula is
=left(a1,1) then copy paste it down to your last row

Collapse -

by maru3445 In reply to Execel and Regular Expres ...

Worked like a charm, thanks. Let me ask you this though, this excel file will be updated on a regular basis, but I don't want to have to copy and paste the formula each time. If I know column A will be the number each time, and column C needs to be the first digit of the data in column A each time, is there anyway to apply this formula to colmun C globally?

Collapse -

by dryflies In reply to Execel and Regular Expres ...

when a cell is selected there is a small square in the lower right corner. drag that square down to the extent of your spreadsheet to copy the formula all the way down. Note, even though nothing will be visible for rows that do not have column a populated, excel will print any page that has the formula pasted into it. For that reason I only prefill as far as I need for the session.
please rate my answer

Related Discussions

Related Forums