Issue with displaying and printing Persian numbers differently in Excel

Anonymous
2024-11-03T13:29:13+00:00

Dear Microsoft Support,

I am writing to report a problem I am encountering with displaying and printing Persian numbers in Excel 2010, 2013, 2016, 2019, 2021, 2024 on Windows 10.

Specifically, when I enter text like "کارگاه 224 واحدی" (which means "Workshop 224 units" in English) in a cell and apply the "B Mitra" font to the whole text except for the number "224" which I want to be in "Calibri" font, the number is displayed correctly in Persian on the screen but is printed in English. This issue persists even when using other fonts.

I don't want to split the parts of my text to some cells for solving the problem, because of form changes!

I would be grateful if you could provide me with some guidance on how to resolve this problem.

Thank you,

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2024-11-06T15:41:39+00:00

    Dear Andreas from Microsoft Support Team,

    First let me make it clear that I am not an employee of Microsoft and here is no support team / forum (in your sense).

    Who's Who in the Community:
    https://answers.microsoft.com/en-us/page/faq#faqWhosWho1

    I am not questioning what you are seeing as a symptom on your system. The point is that there is nothing we can do about it from here.

    We do not collect or report bugs here. This is an answers forum, we help users to achieve there concerns.

    If I have 224 in a text on my system and the cell is formatted with a standard font, then the numbers are ALWAYS displayed in English/Western and NEVER in Persian. Whatever you have on your system that makes this possible, I cannot judge; I don't know enough about the Persian language area and the systems used there.

    What I can say for sure, I know the issues about Persian numbers (an also dates) and so on and my suggested solution is to exchange the related chars. That works all around the world, regardless which font / system / language you use.

    I you want to report a bug or make a suggestion, please use the feedback function in your application:
    How do I give feedback on Microsoft Office? - Office Support

    If you need help to exchange the numbers in your file, share your file and I can write e.g. a code to make this task as simple as possible.

    Andreas.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-11-06T13:30:27+00:00

    The main problem lies in the inability to modify the font of specific parts of the text within a cell.

    Obviously not.

    You say yourself that it is correct on the screen, but not on the printout.

    So everything is fine with Excel and the issue is your printer. End of story, contact the printer manufacturer.

    I did no say you have to use VBA or whatever, I can only tell you how I would solve it, resp. have solved it in the past.

    Furthermore, be lucky that it works for you so far, because "B Mitra" is not a supported font. I can only guess that this is the root cause of all the trouble.

    Andreas.

    Dear Andreas from Microsoft Support Team,

    Thank you for taking the time to assist me with this issue.

    I don't believe the issue is with the printer itself, as I've encountered the same problem when saving the spreadsheet as a PDF and even when I using "Microsoft Print to PDF" printer, and I've tested it with various Models of HP and Toshiba printers.

    Additionally, I've tried using standard Windows fonts like "Arial" and "Calibri", but the problem persists. Specifically, if the entire cell is formatted in "Arial" with the text direction set to "Right-to-Left" and I print to PDF, the numbers appear correctly in Persian. However, if I apply a different font (e.g. "Calibri"), to just a portion of the cell's text (even if it's just a single word like "کارگاه"), the numbers in the PDF output are displayed in English.

    I would greatly appreciate any guidance you can provide.

    Was this answer helpful?

    0 comments No comments
  3. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2024-11-05T11:11:08+00:00

    The main problem lies in the inability to modify the font of specific parts of the text within a cell.

    Obviously not.

    You say yourself that it is correct on the screen, but not on the printout.

    So everything is fine with Excel and the issue is your printer. End of story, contact the printer manufacturer.

    I did no say you have to use VBA or whatever, I can only tell you how I would solve it, resp. have solved it in the past.

    Furthermore, be lucky that it works for you so far, because "B Mitra" is not a supported font. I can only guess that this is the root cause of all the trouble.

    Andreas.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-11-05T08:09:29+00:00

    Specifically, when I enter text like "کارگاه 224 واحدی" (which means "Workshop 224 units" in English) in a cell and apply the "B Mitra" font to the whole text except for the number "224" which I want to be in "Calibri" font, the number is displayed correctly in Persian on the screen but is printed in English.

    Hmm... this is strange because when I format the number as Calibri, the digits are not in Persian. See A1 in this screenshot.

    I need to convert the numbers as shown in A2 into Persian numbers and I can print them without issues.

    Image

    A2: =MakePersianNumber(A1)

    Andreas.

    Function MakePersianNumber(ByVal Expression As String) As String
    Dim i As Long
    Dim Digit As String * 1
    For i = 1 To Len(Expression)
    Digit = Mid$(Expression, i, 1)
    If Digit Like "#" Then Mid$(Expression, i, 1) = ChrW(1776 + Digit)
    Next
    MakePersianNumber = Expression
    End Function

    "Thank you for your suggested solution. Unfortunately, the provided function does not entirely address my issue. The main problem lies in the inability to modify the font of specific parts of the text within a cell.

    Specifically, when I apply a different font (e.g. Calibri), to the numerical portion of the text while keeping the cell's writing direction as "Right-to-Left", the numbers are printed in English, despite being displayed correctly in Persian on the screen.

    Interestingly, if the entire text is formatted in an English font (like Calibri) with the writing direction set to "Right-to-Left," the numbers are printed in Persian even without using the VBA function to convert them. The issue only arises when a different font is applied to the numerical part of the text.

    I kindly request a solution that does not necessitate the use of VBA functions, or one that allows for custom font application to specific portions of the text.

    Thank you for your assistance."

    Was this answer helpful?

    0 comments No comments
  5. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2024-11-04T08:07:05+00:00

    Specifically, when I enter text like "کارگاه 224 واحدی" (which means "Workshop 224 units" in English) in a cell and apply the "B Mitra" font to the whole text except for the number "224" which I want to be in "Calibri" font, the number is displayed correctly in Persian on the screen but is printed in English.

    Hmm... this is strange because when I format the number as Calibri, the digits are not in Persian. See A1 in this screenshot.

    I need to convert the numbers as shown in A2 into Persian numbers and I can print them without issues.

    A2: =MakePersianNumber(A1)

    Andreas.

    Function MakePersianNumber(ByVal Expression As String) As String
    Dim i As Long
    Dim Digit As String * 1
    For i = 1 To Len(Expression)
    Digit = Mid$(Expression, i, 1)
    If Digit Like "#" Then Mid$(Expression, i, 1) = ChrW(1776 + Digit)
    Next
    MakePersianNumber = Expression
    End Function

    Was this answer helpful?

    0 comments No comments