sai excel ways tip 2

1
Sai ExcelWays….a step forward to excellence in Excel. Excel formula to extract a certain portion of a string. This can be done with the combination of functions LEFT, RIGHT, MID, FIND, or LEN Examples: 1. Extract numbers before first dash from a string: 662-718-2255 Here we can use LEFT & FIND function. LEFT function to extract text and FIND function to find the position of dash in string. 2. Extract numbers after first dash from a string: 662-718 Here we can use RIGHT, FIND & LEN function. RIGHT function to extract text. FIND function to find the position of dash in string. LEN to find the number of characters in the string. 3. Extract numbers after second dash from a string: 662-718-2255 Similarly 718 can be extracted from 662-718-2255 by using formula =MID(A23,FIND("-",A23)+1,LEN(A23)- FIND("-",A23,FIND("-",A23)+1)-1)

Upload: sai-excelways

Post on 27-Dec-2014

161 views

Category:

Documents


1 download

DESCRIPTION

Sai ExcelWays….a step forward to excellence in Excel. Excel Tips & Tricks Excel formula to extract a certain portion of a string.

TRANSCRIPT

Page 1: Sai excel ways tip 2

Sai ExcelWays….a step forward to excellence in Excel.

Excel formula to extract a certain portion of a string. This can be done with the combination of functions LEFT, RIGHT, MID, FIND, or LEN

Examples:

1. Extract numbers before first dash from a string: 662-718-2255

Here we can use LEFT & FIND function.

LEFT function to extract text and FIND function to find the position of dash in string.

2. Extract numbers after first dash from a string: 662-718

Here we can use RIGHT, FIND & LEN function.

• RIGHT function to extract text. • FIND function to find the position of dash in string. • LEN to find the number of characters in the string.

3. Extract numbers after second dash from a string: 662-718-2255

Similarly 718 can be extracted from 662-718-2255 by using formula =MID(A23,FIND("-",A23)+1,LEN(A23)-FIND("-",A23,FIND("-",A23)+1)-1)