Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula

Status
Not open for further replies.

vincentharris

Programmer
Jun 4, 2009
24
US
Hello:

I have a spreadsheet with the following info:
SUMMARY AGENCY
DNR- HD reaction is slow IBM
GDC - User's having computer issues. IBM
GTA-New Laptop needs visio IBM
User Called stating her computer is slow IBM
DHR- Internet Explore Error IBM
GDC - Monitor is broken IBM
DHR - Computer is Slow IBM
DNR Danny Brown ...PC will not boot IBM

In the Agency field "IBM" is there and I would like to create a formula that would change the name IBM to the agency in the same. For example, in the first line the DNR agency is at the beginning in the Summary and the Agency is IBM. I need a formula the will allow me to pull the DNR agency name instead.
 
I'm not clear on what exactly you're asking.

Do you want to replace "IBM" in the "Agency" column (we'll call that Column B) with the three-letter prefix from the "Summary" column (we'll call that Column A)?

If so, then just use the following formula in column B the "Agency" column:
[tab]=Left(A2, 3)

If the prefix from column A might contain different number of characters, that will have to be taken into consideration with a different formula.

If I've missed the mark here, please provide more information about what it is you want to do.

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
vincentharris,
If the agency name is at the beginning and always followed by either a hyphen or a space, then you can retrieve it using this formula:
=LEFT(A2,FIND(" ",SUBSTITUTE(A2,"-"," "))-1)

Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top