Need to convert a number from a parsed Arabic sentence to a number

Nineball

New Member
Joined
Jan 1, 2022
Messages
34
Office Version
  1. 2010
Platform
  1. Windows
After parsing an Arabic sentence that contains a number, the number appears at the right hand side of the cell. I believe the number appears as text. Any formula on the cell results in #VALUE.
I haven't found any function that will change it to a number. Any suggestions? thanks
 

Attachments

  • Example.jpg
    Example.jpg
    161.9 KB · Views: 14
Ok, the google link doesn't work but dropbox link does, so it's ok.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Thank you. Unfortunately, I don't think this will work for you then, but thought I'd post it in case you see something that offers another idea:
Book4
ABCDE
101st number2nd numberModified ExcerptOriginal
111171Z171:17‏ خۇدا بۇلارنى يەرگە يورۇقلۇق بېرىپ، كۈندۈز بىلەن كېچىنى باشقۇرۇپ، يورۇقلۇق بىلەن قاراڭغۇلۇقنى ئايرىسۇن دەپ ئاسمانلارنىڭ گۈمبىزىگە ئورۇنلاشتۇردى. خۇدا بۇنىڭ ياخشى بولغانلىقىنى كۆردى.
12117
Sheet5
Cell Formulas
RangeFormula
A11:B11A11=TEXTSPLIT(D11,"Z")+0
D11D11=ALPHANUMONLY(SUBSTITUTE(E11,":","Z"))
A12A12=LEFT(D11,FIND("Z",D11)-1)+0
B12B12=RIGHT(D11,LEN(D11)-FIND("Z",D11))+0
Dynamic array formulas.

This relies on several LAMBDA functions...and I don't think Excel 2021 has them, does it? This approach was contributed by @lrobbo314 at...
This involves setting up the three LAMBDA functions (details in the link) in the Name Manager to essentially create a new function to remove all characters except alphanumerics. So I substitute a "Z" for the colon, apply the LAMBDA function to extract the verse numbers, and then split that text apart using either of two approaches.
 
Upvote 0
Thank you. Unfortunately, I don't think this will work for you then, but thought I'd post it in case you see something that offers another idea:
Book4
ABCDE
101st number2nd numberModified ExcerptOriginal
111171Z171:17‏ خۇدا بۇلارنى يەرگە يورۇقلۇق بېرىپ، كۈندۈز بىلەن كېچىنى باشقۇرۇپ، يورۇقلۇق بىلەن قاراڭغۇلۇقنى ئايرىسۇن دەپ ئاسمانلارنىڭ گۈمبىزىگە ئورۇنلاشتۇردى. خۇدا بۇنىڭ ياخشى بولغانلىقىنى كۆردى.
12117
Sheet5
Cell Formulas
RangeFormula
A11:B11A11=TEXTSPLIT(D11,"Z")+0
D11D11=ALPHANUMONLY(SUBSTITUTE(E11,":","Z"))
A12A12=LEFT(D11,FIND("Z",D11)-1)+0
B12B12=RIGHT(D11,LEN(D11)-FIND("Z",D11))+0
Dynamic array formulas.

This relies on several LAMBDA functions...and I don't think Excel 2021 has them, does it? This approach was contributed by @lrobbo314 at...
This involves setting up the three LAMBDA functions (details in the link) in the Name Manager to essentially create a new function to remove all characters except alphanumerics. So I substitute a "Z" for the colon, apply the LAMBDA function to extract the verse numbers, and then split that text apart using either of two approaches.
my version doesn't have TEXTSPLIT or ALPHANUMONLY
 
Upvote 0
Okay...TEXTSPLIT is a native function in 365, but there are work-arounds without it (shown in A12:B12). ALPHANUMONLY is the name assigned to one of the three LAMDA functions that would be set up in the Name Manager, but I don't think Excel 2021 includes LAMBDA. To check, go to an empty cell and begin typing =LA to see if the autocomplete feature suggests the LAMBDA function (assuming you have the autocomplete feature active).
 
Upvote 0
Okay...TEXTSPLIT is a native function in 365, but there are work-arounds without it (shown in A12:B12). ALPHANUMONLY is the name assigned to one of the three LAMDA functions that would be set up in the Name Manager, but I don't think Excel 2021 includes LAMBDA. To check, go to an empty cell and begin typing =LA to see if the autocomplete feature suggests the LAMBDA function (assuming you have the autocomplete feature active).
the only thing that comes up is =large.

I very much appreciate your efforts here. I'm working on a project where I encounter right to left languages though infrequently. I will just live with this limitation. It just pisses me off to come across a problem that I cannot solve in Excel. I blame it on Excel. Have you ever tried creating paragraphs by concatenating cells for Arabic? The results are whacked. maybe if I bought Excel in Egypt I'd have better luck. Anyway, cheers and thanks again.
 
Upvote 0
Try the green cells...a VBA solution:
Book4
ABCDE
131st number2nd numberModified ExcerptOriginal
141171Z171:17‏ خۇدا بۇلارنى يەرگە يورۇقلۇق بېرىپ، كۈندۈز بىلەن كېچىنى باشقۇرۇپ، يورۇقلۇق بىلەن قاراڭغۇلۇقنى ئايرىسۇن دەپ ئاسمانلارنىڭ گۈمبىزىگە ئورۇنلاشتۇردى. خۇدا بۇنىڭ ياخشى بولغانلىقىنى كۆردى.
Sheet5
Cell Formulas
RangeFormula
A14A14=LEFT(D14,FIND("Z",D14)-1)+0
B14B14=RIGHT(D14,LEN(D14)-FIND("Z",D14))+0
D14D14=AlphaNumericOnly(SUBSTITUTE(E11,":","Z"))

VBA Code:
Function AlphaNumericOnly(strSource As String) As String
    Dim i As Integer
    Dim strResult As String

    For i = 1 To Len(strSource)
        Select Case Asc(Mid(strSource, i, 1))
            Case 48 To 57, 65 To 90, 97 To 122: 'include 32 if you want to include space
                strResult = strResult & Mid(strSource, i, 1)
        End Select
    Next
    AlphaNumericOnly = strResult
End Function
 
Upvote 0
I don't know if you guys noticed but it doesn't happen on every row. The only thing I see in common with the 3 rows with the problem is that there is a period on the very right.
 
Upvote 0
Try the green cells...a VBA solution:
Book4
ABCDE
131st number2nd numberModified ExcerptOriginal
141171Z171:17‏ خۇدا بۇلارنى يەرگە يورۇقلۇق بېرىپ، كۈندۈز بىلەن كېچىنى باشقۇرۇپ، يورۇقلۇق بىلەن قاراڭغۇلۇقنى ئايرىسۇن دەپ ئاسمانلارنىڭ گۈمبىزىگە ئورۇنلاشتۇردى. خۇدا بۇنىڭ ياخشى بولغانلىقىنى كۆردى.
Sheet5
Cell Formulas
RangeFormula
A14A14=LEFT(D14,FIND("Z",D14)-1)+0
B14B14=RIGHT(D14,LEN(D14)-FIND("Z",D14))+0
D14D14=AlphaNumericOnly(SUBSTITUTE(E11,":","Z"))

VBA Code:
Function AlphaNumericOnly(strSource As String) As String
    Dim i As Integer
    Dim strResult As String

    For i = 1 To Len(strSource)
        Select Case Asc(Mid(strSource, i, 1))
            Case 48 To 57, 65 To 90, 97 To 122: 'include 32 if you want to include space
                strResult = strResult & Mid(strSource, i, 1)
        End Select
    Next
    AlphaNumericOnly = strResult
End Function
I kind of understand. Why is D14 referencing E11?
 
Upvote 0
Thanks guys. I'm exhausted from this. Again, thank you and good night
 
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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