البرمجة

كيفية مطابقة البيانات بين صفحتي Excel وإدراج قيم في Excel

It looks like you’re trying to match IDs between two different Excel sheets and insert a column based on the matching criteria. If I understand correctly, you want to compare the values in column B of the “ID_proptitle” sheet with the values in column B of the “pictures” sheet. If a match is found, you want to insert the corresponding value from column A of the “ID_proptitle” sheet into the “pictures” sheet.

To achieve this, you can use a formula in Excel instead of VBA. Here’s a step-by-step guide:

  1. Insert a New Column in the “pictures” Sheet: Insert a new column (let’s say column D) in the “pictures” sheet where you want to insert the matching IDs.

  2. Use VLOOKUP Formula: In cell D1 of the “pictures” sheet, enter the following formula:

    excel
    =VLOOKUP(B1, ID_proptitle!B:C, 2, FALSE)

    This formula looks for the value in cell B1 of the “pictures” sheet (the ID) in column B of the “ID_proptitle” sheet. If a match is found, it returns the corresponding value from column C of the “ID_proptitle” sheet (the title). The FALSE argument ensures that only exact matches are returned.

  3. Fill Down the Formula: After entering the formula in cell D1, drag the fill handle (the small square at the bottom-right corner of the cell) down to fill the formula for all the rows where you have data in column B of the “pictures” sheet.

This should populate column D of the “pictures” sheet with the corresponding titles from the “ID_proptitle” sheet based on the matching IDs.

If you need further assistance or if this doesn’t solve your problem, please let me know!

المزيد من المعلومات

إذا كنت تحتاج إلى مزيد من المعلومات حول كيفية تطبيق الصيغة في Excel لإجراء المطابقة بين الأعمدة وإدراج القيم المطابقة في الأعمدة الجديدة، فإليك تفاصيل إضافية:

  1. وظيفة VLOOKUP:

    • المعنى: تُستخدم وظيفة VLOOKUP في Excel للبحث عن قيمة محددة في العمود الأول من نطاق معين من البيانات، ثم إرجاع قيمة متوافقة من العمود الثاني لهذا النطاق.
    • المعاملات:
      • القيمة التي تُبحث عنها: في هذه الحالة، القيمة في خلية B1 من ورقة “pictures” (الصور).
      • النطاق الذي يتم البحث فيه: في هذه الحالة، الأعمدة B و C من ورقة “ID_proptitle” (الهوية والعنوان).
      • العمود الذي يُراد إرجاع القيمة منه: في هذه الحالة، العمود C من ورقة “ID_proptitle” (العنوان).
      • البحث عن تطابقات دقيقة فقط: القيمة FALSE تضمن ذلك.
  2. سحب الصيغة لأسفل:

    • بعد كتابة الصيغة في الخلية D1، اسحب النقطة الصغيرة الموجودة في الزاوية السفلية اليمنى للخلية (المقبض) إلى أسفل لتعبئة الصيغة لجميع الصفوف التي تحتوي على بيانات في العمود B من ورقة “pictures”.
  3. عناية بالتطابقات الدقيقة:

    • يُرجى التأكد من أن القيم المطابقة تكون مطابقة تمامًا (بدون فراغات أو أحرف أخرى) لأن وظيفة VLOOKUP لن تعثر على تطابق إذا كانت هناك أي اختلافات.

بعد إتباع هذه الخطوات، يجب أن تظهر القيم المطابقة من ورقة “ID_proptitle” في العمود D من ورقة “pictures” بناءً على الهويات المتطابقة في العمود B. إذا كان لديك أي استفسارات إضافية أو إذا كنت بحاجة إلى مساعدة أخرى، فلا تتردد في طرحها!

زر الذهاب إلى الأعلى