كيفية التحقق مما إذا كان الحرف الأول في خلية محددة هو حرف كبير في Excel؟
قد يكون من السهل جعل جميع الأحرف كبيرة في خلية في Excel. ومع ذلك ، هل تعرف كيفية التحقق فقط مما إذا كان الحرف الأول كبيرًا أم لا في خلية محددة في Excel؟ ستقدم هذه المقالة رمز VBA لمساعدتك في تحقيقه.
تحقق مما إذا كان الحرف الأول في خلية محددة هو حرف كبير برمز VBA
- إعادة استخدام أي شيء: أضف الصيغ والمخططات الأكثر استخدامًا أو تعقيدًا وأي شيء آخر إلى مفضلاتك ، وأعد استخدامها بسرعة في المستقبل.
- أكثر من 20 ميزة نصية: استخراج رقم من سلسلة نصية ؛ استخراج أو إزالة جزء من النصوص ؛ تحويل الأرقام والعملات إلى الكلمات الإنجليزية.
- أدوات الدمج: مصنفات وأوراق متعددة في واحد ؛ دمج خلايا / صفوف / أعمدة متعددة دون فقد البيانات ؛ دمج الصفوف المكررة والمجموع.
- أدوات الانقسام: تقسيم البيانات إلى أوراق متعددة بناءً على القيمة ؛ مصنف واحد لملفات Excel أو PDF أو CSV متعددة ؛ عمود واحد إلى أعمدة متعددة.
- لصق التخطي صفوف مخفية / مصفاة العد والمجموع حسب لون الخلفية؛ إرسال رسائل بريد إلكتروني مخصصة إلى مستلمين متعددين بشكل مجمع.
- مرشح سوبر: إنشاء مخططات تصفية متقدمة وتطبيقها على أي أوراق ؛ تصنيف حسب: حسب الأسبوع واليوم والتكرار والمزيد ؛ تصفية بواسطة bold، formulas، comment ...
- أكثر من 300 ميزة قوية ؛ يعمل مع Office 2007-2021 و 365 ؛ يدعم جميع اللغات ؛ سهولة النشر في مؤسستك أو مؤسستك.
تحقق مما إذا كان الحرف الأول في خلية محددة هو حرف كبير برمز VBA
يرجى القيام بما يلي لتطبيق رمز VBA للتحقق مما إذا كان الحرف الأول في الخلية كبيرًا أم لا في Excel.
1. اضغط على قديم + F11 مفاتيح في نفس الوقت لفتح ميكروسوفت فيسوال باسيك للتطبيقات نافذة.
2. في ال ميكروسوفت فيسوال باسيك للتطبيقات نافذة ، الرجاء الضغط إدراج > وحدة. ثم انسخ والصق رمز فبا التالي في نافذة التعليمات البرمجية.
كود فبا: تحقق مما إذا كان الحرف الأول كبير في الخلية
Sub UpperCaseCheck()
Dim xRg As Range
Dim xAsc As Integer
Set xRg = Range("A1")
xAsc = Asc(Mid(xRg.Value, 1, 1))
If xAsc > 64 And xAsc < 91 Then
MsgBox "First alpha character is capital"
Else
MsgBox "First alpha character is not capital"
End If
End Sub
Note: In the code, A1 is the cell which you will check if the first letter is capital. Please change it as you need.
3. Press the F5 key to run the code. Then a Microsoft Excel dialog box pops up to tell you whether the first letter in that specified cell is capital or not as below screenshots shown.

Related Articles:
- How to check if a cell value is between two values in Excel?
- How to check if cell begins or ends with a specific character in Excel?
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
- Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- More than 300 powerful features. Supports Office / Excel 2007-2021 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!