ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   need excel to look for the 4th digit in a cell then insert new num (https://www.excelbanter.com/excel-discussion-misc-queries/78392-need-excel-look-4th-digit-cell-then-insert-new-num.html)

PIPERHAMMY

need excel to look for the 4th digit in a cell then insert new num
 
I am in the process of designing a spreadsheet and have came to a stumbling
block! I need excel to look at a cell and if the 4th digit is equal to A,B,C,
D, etc insert the corresponding number i.e. if excel looks at cell 'A1' the
number in that cell is 123B123 then in cell 'B1' I want it to enter 12345, if
it was 123C123 I would want it to insert 56789, if D 13465 would appreciate
any help. I have on the worksheet the list of letters and the list of
corresponding numbers so was wondering about some sort of lookup?

yours Aye

Bruce

Toppers

need excel to look for the 4th digit in a cell then insert new num
 
Use VLOOKUP:


in B1:

=VLOOKUP(MID(A1,4,1),D1:E3,2,FALSE)

Columns D-E contains your lookup table as shown below

A B D E
123B345 56789 A 12345
B 56789
C 13645


HTH


"PIPERHAMMY" wrote:

I am in the process of designing a spreadsheet and have came to a stumbling
block! I need excel to look at a cell and if the 4th digit is equal to A,B,C,
D, etc insert the corresponding number i.e. if excel looks at cell 'A1' the
number in that cell is 123B123 then in cell 'B1' I want it to enter 12345, if
it was 123C123 I would want it to insert 56789, if D 13465 would appreciate
any help. I have on the worksheet the list of letters and the list of
corresponding numbers so was wondering about some sort of lookup?

yours Aye

Bruce



All times are GMT +1. The time now is 03:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com