انتقل إلى المحتوى الرئيسي

كيف تخفي الصيغة مع عرض النتيجة دون حماية ورقة العمل في Excel؟

في بعض الحالات ، قد تحتاج إلى إخفاء الصيغ في ورقة العمل الخاصة بك. تتحدث هذه المقالة عن إخفاء الصيغ مع عرض النتائج دون حماية ورقة العمل في Excel.

إخفاء الصيغة ولكن عرض النتيجة دون حماية ورقة العمل برمز VBA


إخفاء الصيغة ولكن عرض النتيجة دون حماية ورقة العمل برمز VBA

لإخفاء الصيغ مع عرض النتائج دون حماية ورقة العمل ، يرجى القيام بما يلي.

1. في ورقة العمل ، تحتاج إلى إخفاء الصيغ ولكن مع عرض النتائج ، يرجى النقر بزر الماوس الأيمن فوق علامة تبويب الورقة ، وتحديد عرض الرمز من قائمة النقر بزر الماوس الأيمن.

2. في ال ميكروسوفت فيسوال باسيك للتطبيقات نافذة ، يرجى نسخ ولصق رمز VBA في نافذة التعليمات البرمجية.

كود فبا: إخفاء الصيغة ولكن عرض النتيجة دون حماية ورقة العمل

Dim xDic As New Dictionary
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim xCell As Range
    Dim xRg As Range
    Set xRg = Range("C1:C10")
    If xDic.Count <> xRg.Count Then
        For Each xCell In xRg
            xDic.Add xCell.Address, xCell.FormulaR1C1
        Next
    End If
    If (Target.Count = 1) And (Not Application.Intersect(xRg, Target) Is Nothing) And (Target.HasFormula) Then
        With Target
            .Value = .Value
        End With
    Else
        For Each xCell In xRg
            xCell.Formula = xDic.Item(xCell.Address)
        Next
    End If
End Sub

ملاحظات: في الكود ، C1: C10 هو نطاق الخلايا الذي تريد إخفاء الصيغ بداخله. يرجى تغييره بناءً على احتياجاتك.

3. ثم اضغط الأدوات > المراجع…. مراجعة وقت تشغيل البرنامج النصي لـ Microsoft مربع وانقر فوق OK زر في المراجع - VBAProject نافذة او شباك. انظر لقطة الشاشة:

4. اضغط على قديم + Q مفاتيح لإغلاق ميكروسوفت فيسوال باسيك للتطبيقات نافذة.

من الآن فصاعدًا ، عند النقر فوق الخلية في النطاق المحدد ، سيتم إخفاء الصيغة على الفور في شريط الصيغة.


مقالات ذات صلة:

أفضل أدوات إنتاجية المكتب

🤖 مساعد Kutools AI: إحداث ثورة في تحليل البيانات على أساس: التنفيذ الذكي   |  إنشاء التعليمات البرمجية  |  إنشاء صيغ مخصصة  |  تحليل البيانات وإنشاء الرسوم البيانية  |  استدعاء وظائف Kutools...
الميزات الشعبية: البحث عن التكرارات أو تمييزها أو تحديدها   |  حذف الصفوف الفارغة   |  دمج الأعمدة أو الخلايا دون فقدان البيانات   |   جولة بدون صيغة 
سوبر بحث: معايير متعددة VLookup    VLookup ذات القيمة المتعددة  |   VLookup عبر أوراق متعددة   |   بحث غامض ....
قائمة منسدلة متقدمة: إنشاء القائمة المنسدلة بسرعة   |  القائمة المنسدلة التابعة   |  قائمة منسدلة متعددة التحديد ....
مدير العمود: إضافة عدد محدد من الأعمدة  |  نقل الأعمدة  |  تبديل حالة رؤية الأعمدة المخفية  |  مقارنة النطاقات والأعمدة 
الميزات المميزة: التركيز على الشبكة   |  عرض تصميم   |   شريط الفورمولا الكبير    مدير المصنفات والأوراق   |  مكتبة الموارد (النص السيارات)   |  منتقي التاريخ   |  اجمع أوراق العمل   |  تشفير/فك تشفير الخلايا    إرسال رسائل البريد الإلكتروني عن طريق القائمة   |  سوبر تصفية   |   مرشح خاص (تصفية غامق / مائل / يتوسطه خط ...) ...
أفضل 15 مجموعة أدوات12 نص الأدوات (إضافة نص, إزالة الأحرف، ...)   |   +50 رسم الأنواع (مخطط جانت، ...)   |   40+ عملي الصيغ (احسب العمر على أساس تاريخ الميلاد، ...)   |   19 إدخال الأدوات (أدخل رمز الاستجابة السريعة, إدراج صورة من المسار، ...)   |   12 تحويل الأدوات (أرقام إلى كلمات, نتيجة تحويل عملة، ...)   |   7 دمج وتقسيم الأدوات (الجمع بين الصفوف المتقدمة, تقسيم الخلايا، ...)   |   ... و اكثر

عزز مهاراتك في Excel باستخدام Kutools for Excel، واختبر كفاءة لم يسبق لها مثيل. يقدم Kutools for Excel أكثر من 300 ميزة متقدمة لتعزيز الإنتاجية وتوفير الوقت.  انقر هنا للحصول على الميزة التي تحتاجها أكثر...

الوصف


يجلب Office Tab الواجهة المبوبة إلى Office ، ويجعل عملك أسهل بكثير

  • تمكين التحرير والقراءة المبوبة في Word و Excel و PowerPointوالناشر والوصول و Visio والمشروع.
  • فتح وإنشاء مستندات متعددة في علامات تبويب جديدة من نفس النافذة ، بدلاً من النوافذ الجديدة.
  • يزيد من إنتاجيتك بنسبة 50٪ ، ويقلل مئات النقرات بالماوس كل يوم!
Comments (20)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
saya da coba sesuai coding nya, bisa berjalan, tetapi di layar ketika saya klik ke tempat yang dimaksud ada keluar tanda loading, (tanda bulat berkedip). File saya mmg 18 MB, bagaimana caranya agar tidak keluar tanda kedip tersebut ?
This comment was minimized by the moderator on the site
Hi akkia,
The problem you mentioned is not reproduced in my case. May I ask which Excel version you are using?
This comment was minimized by the moderator on the site
dia tetap loading ya ko ?
This comment was minimized by the moderator on the site
Thank you for this code, I really needed something like this
Rated 5 out of 5
This comment was minimized by the moderator on the site
formula worked but the problem is when we close the sheet and reopen it than VBA not worked...
This comment was minimized by the moderator on the site
Hi, To continue using this VBA in future, after adding the code, please save the workbook as an Excel Macro-Enabled Workbook.Click File > Save As. In the Save As dialog box, select Excel Macro-Enabled Workbook from the Save as type drop down list, then click the Save button.And then use this excel macro-enabled workbook in the future.
This comment was minimized by the moderator on the site
Hi Im gracy, i am trying to hide the formula in a particular column without password protecting the sheet. i copy pasted the entire code and changed the cells but still unable to hide the formula. Can you please assist.

This comment was minimized by the moderator on the site
Thank you. Formula Worked.
This comment was minimized by the moderator on the site
after this vba code apply new sum formula result not showing in cell, please help....
This comment was minimized by the moderator on the site
If we press and hold the mouse left click to a cell, the formula shows until you release the left click. Otherwise this should work fine.
This comment was minimized by the moderator on the site
I tried using the VBA code but after applying this code my excel is getting slow and hanged.please help me in resolving this issue.
This comment was minimized by the moderator on the site
There is easy way as well.
Select the cell or cells you want to hide the formula or data.
Go to Home --> Format --> Format Cells --> Number --> Custom
Under Type, Remove General and Enter """"
The cell value or formula do not appear on the screen
However it will appear in the Formula bar if you select the cell.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations