Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Excel - Picking letter in a string


  • Please log in to reply

#1
ChrisWright

ChrisWright

    Member

  • Member
  • PipPip
  • 34 posts
Hello,

I am working on a project in which data is restricted to choices, and then records those choices in abreviated form, e.g.

Choice 1: blue green red
Abreviated: bl gr re

Choice 2: stitched stapled
Abreviated: sti sta

Choice 3: Type01 Type02 Type03
Abreviated: 01 02 03


The abreviated forms will be all stored in a single cell for each record (although seperate cells may be used for calculations)

Therefore, examples of the possible results of the choices could be:

blsti01 (for Blue, Stitched and Type01)

--or--

grsti03 (for Green, Stitched and Type03)

--or--

resta02 (for Red, Stapled and Type02)


I need to understand how to use the functions RIGHT, LEFT and LEN (as i believe these are what are needed), to create a system to pick the information back out from the combined abreviations...



By this I mean it should take 'blsti01' and be able to take the bl , sti and 01 back out. From this point, I am able to design the rest... Any help :whistling: ??

Thanks for reading,
Chris W


Edited by ChrisWright, 31 October 2006 - 01:56 PM.

  • 0

Advertisements


#2
piper

piper

    Retired Staff

  • Retired Staff
  • 2,459 posts
If I understand what you want to do, you've got a cell with blsti01 and want to use the functions to expand it back to words?


If (Left(a2,2)="bl", "Blue", if (RIGHT(a2,2)="gr", "Green", "Red"))
You're comparing cell A2, the left 2 characters.

If (Mid(a2,3,2)="sti", "Stitched", "Stapled")
You're comparing cell A2, the middle 2 characters beginning at the 3rd character.

If (RIGHT(a2,2)="01", "Type 01", if (RIGHT(a2,2)="02", "Type 02", "Type 03"))
You're compariing cell a2, the right 2 characters.

If this isn't what you need, post back.
  • 0

#3
ChrisWright

ChrisWright

    Member

  • Topic Starter
  • Member
  • PipPip
  • 34 posts
Thank you !

This is an almost perfect solution to the problem, although you made a typo in the Excel code (don't worry, I fixed it easily :whistling: !)


Once again, thank you for your help !

Chris W


  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP