formula in next cell

ericlch16

Active Member
Joined
Nov 2, 2007
Messages
313
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
i have these in a column. each line is a row

128982 VC AAAA
1389883; MC AAAA
1589 DC BBBB
179024;VC DDDDD
1212313;AM EEEEE
18902 MC FFFFF
18902 FFFFF
3033383; B#111; VC; XXXX
3035383; B#222; DC; YYYY

i want the next column to be

VC
MC
DC
VC
AM
MC
<blank>
VC
DC

any formula i can put in a cell to generate the next column?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Are those the only 4 values it could be in those cells or do you have more and these are just an example?

I don't see any clear cut reason how Excel would know to extract these? It is not always after the first space and there is not always a ; character.

Do you have any information that might distinguish this better?
 
Upvote 0
Are those the only 4 values it could be in those cells or do you have more and these are just an example?

I don't see any clear cut reason how Excel would know to extract these? It is not always after the first space and there is not always a ; character.

Do you have any information that might distinguish this better?

basically what i want is:

if the cell contains DC returns DC
if the cell contains AM returns AM
if the cell contains MC returns MC
if the cell contains VC returns VC
else return blank


if a cell contain DC and AM .. it does not matter it returns DC.

i try this but not working yet

=IF(ISERROR(FIND("VC",G6055)),"VC",IF(ISERROR(FIND("MC",G6055)),"MC",IF(ISERROR(FIND("AC",G6055)),"AC",IF(ISERROR(FIND("DC",G6055)),"DC",""))))
 
Upvote 0
Also perhaps change FIND to SEARCH..

Find = Case Sensitive (will only find DC, will NOT find Dc or dC or dc)
Search = Not Case Sensitive.
 
Upvote 0
Try

=LOOKUP("z",CHOOSE({1,2},"",LOOKUP(2,1/SEARCH($F$1:$F$4,A1),$F$1:$F$4)))

A1 = Text string
F1:F4 = list of values (VC,MC,DC,AM)
 
Upvote 0
it works!

=LOOKUP("z",CHOOSE({1,2},"",LOOKUP(2,1/SEARCH(listofcards!$F$1:$F$4,G6055),listofcards!$F$1:$F$4)))

Yeah! i put it in another sheet.
 
Upvote 0
Works for me

Excel Workbook
ABC
1128982 VC AAAAVC
21389883; MC AAAAMC
31589 DC BBBBDC
4179024;VC DDDDDVC
51212313;AM EEEEEAM
618902 MC FFFFFMC
718902 FFFFF 
83033383; B#111; VC; XXXXVC
93035383; B#222; DC; YYYYDC
Sheet1
Excel Workbook
F
1VC
2MC
3DC
4AM
listofcards
 
Upvote 0
But I did use SEARCH which is NOT case sensitive, you may want to change search to find.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,672
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top