creating a formula that condenses information in a cell

  • Thread starter Looking for Answers
  • Start date
L

Looking for Answers

I need a formula that brings back a set amount of information when there are
variable amounts of information in the selected cell. I am working in a
spreadsheet where column a has numbers of different length. I am trying to
create a formula that brings back a variable amount of information. In some
cases I would need the first four digits brought back, in others the first
five digits, and so on.
 
D

David Billigmeier

Is there any kind of pre-set logic to how many characters you bring back?
For example do you have a hyphen separating the strings in each cell, and you
want to bring back everything to the left of that? e.g. you want the "1FY3"
part of "1FY3-DI84"? In this case: =LEFT(A1,SEARCH("-",A1)-1)

If this isn't what you're looking for search the help menu for LEFT(), MID()
and RIGHT() for pulling out substrings of variable lengths.
 
Top