Solved

Edit value

Posted on 2011-02-20
3
215 Views
Last Modified: 2012-05-11
Hello I have a values that I need to evaluate, but what I need to do is if there is a BR FG HZ or BL then ignore that and display the other values example below

RAPL BR   need just RAPL
TSRA FG   need just TSRA
RABR  need just BR
SHRA FG need just SHRA
BLSN FG  need just SN
0
Comment
Question by:sandramac
  • 2
3 Comments
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 34938796
Hello,

can you check your data sample again?

>> RABR  need just BR

Should that not be RA as the result?

Are these values in cells in a worksheet? If so, try

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"BR",""),"FG",""),"HZ",""),"BL","")

cheers, teylyn
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34938805
You might also want to add a TRIM function to that, teylyn, otherwise some trailing/leading spaces may remain....

regards, barry
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst earned 500 total points
ID: 34938892
Good catch, barry.

Just wrap a trim() around it

=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"BR",""),"FG",""),"HZ",""),"BL",""))
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now