extracting a string from a cell

cjsmith22

New Member
Joined
Nov 2, 2005
Messages
22
is there any way to extract whatever string is in a particular cell in order to then compare that string with strings in cells in other ranges?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
hi;
you can use several functions within macros or formulas:
mid(string,start, lengh) extracts as from "start" the number of character "length" from the cell.value (string)
or
trim (string) extracts of a string without the right/left blank spaces
or left(string, length) extracts the left part of a string for a certain number of characters(length)
or right(string,length same for right part)

to know how long is the string of a particular cell, use the function : len(string)
Hope this helps
 
Upvote 0
thanks for the response - what i need to do is quite complicated - or at least it is to me - i have two ranges (myfootballresults and myleaguetable) in a worksheet and what i need to do is update the leaguetable according to the results. so if, for example, the first result is chelsea 2 villa 1
i need to check whats in the first cell (in this case chelsea), check whether they won, drew or lost, then i need to match the cell (chelsea) with the same cell(chelsea) in the myleaguetable range, and then update the myleaguetable accordingly. that make any sense? cheers in advance
Copy of Table.xls
ABCDEFGHI
1324-Sep-05Chelsea2AstonVilla1
1424-Sep-05Everton0Wigan1
Update 7
Copy of Table.xls
ABCDEFGHIJKLMN
23HomeAway
24PWDLFAWDLFAGDPts
25Chelsea740091300501321
26Charlton61011240092615
27Bolton72113121053414
Update 7
 
Upvote 0
thanks just_jon - the problem i've got is that the macro needs to be able to run successfully for any number of teams in a league and any set of results and i'm not sure how it can be done.
 
Upvote 0

Forum statistics

Threads
1,203,094
Messages
6,053,506
Members
444,667
Latest member
KWR21

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