Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by dgravitt
at 2024-07-30 08:25:36
Point:500 Replies:9 POST_ID:829170USER_ID:12063
Topic:
Microsoft Access Database;;
I have a string "115 CS 575840" that I need to return the 6 numbers that are together. So, from this string I need to return 575840.
Expert: Rey Obrero (Microsoft Access MVP) replied at 2024-07-30 09:25:51
dgravitt,
cool, but next time, it will be helpful if all scenario about the data is available.
cool, but next time, it will be helpful if all scenario about the data is available.
Author: dgravitt replied at 2024-07-30 09:22:11
I found a work around to handle the records where it just contained 6 numbers, and Rey, your solution handled the rest.
Expert: duncanb7 replied at 2024-07-30 09:07:23
If always next to "CS"
=MID(A1,FIND("CS",A1)+3,6)
Duncan
=MID(A1,FIND("CS",A1)+3,6)
Duncan
Author: dgravitt replied at 2024-07-30 09:03:00
CS is not always part of it
Author: dgravitt replied at 2024-07-30 08:56:43
Rey, yours works well except the case where there are only 6 numbers in the field. Then it returns an error.
Author: dgravitt replied at 2024-07-30 08:52:35
The 6 numbers could be at the end, beginning or middle. I need to pull out the 6 no matter where they are.
Accepted Solution
Expert: Rey Obrero (Microsoft Access MVP) replied at 2024-07-30 08:49:51
500 points EXCELLENT
this should do it
trim(mid(yourString,instrrev(yourString," ")))
trim(mid(yourString,instrrev(yourString," ")))
Expert: Iammontoya replied at 2024-07-30 08:36:41
if your last numbers are always six digits you can try this:
=NUMBERVALUE(RIGHT(B3,6))
this takes the text in column B3 and takes the 6 digits from the end, and converts them to a number value
=NUMBERVALUE(RIGHT(B3,6))
this takes the text in column B3 and takes the 6 digits from the end, and converts them to a number value
Expert: duncanb7 replied at 2024-07-30 08:34:35
Is it what your want ?
MID(yourtext,LEN(yourtext)-5,6)
Duncan
MID(yourtext,LEN(yourtext)-5,6)
Duncan