اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

الردود الموصى بها

قام بنشر

السلام عليكم ورحمة الله

استخدم هذا الكود

Sub DataDate()
Dim ws As Worksheet, C As Range
Dim LR As Long, i As Integer, x As Integer
Dim Dt
Set ws = Sheets("ADD")
LR = ws.Range("B" & Rows.Count).End(xlUp).Row
Dt = ws.Range("S2")
For Each C In ws.Range("E2:P2")
If C.Value = ws.Range("R2") Then
x = C.Column
End If
Next
i = 3
Do While i <= LR
If ws.Cells(i, "C") <= Dt And ws.Cells(i, "D") >= Dt Then
ws.Cells(i, "R") = ws.Cells(i, x)
End If
i = i + 1
Loop
End Sub

 

  • Thanks 1
قام بنشر
2 ساعات مضت, ابراهيم الحداد said:

السلام عليكم ورحمة الله

استخدم هذا الكود


Sub DataDate()
Dim ws As Worksheet, C As Range
Dim LR As Long, i As Integer, x As Integer
Dim Dt
Set ws = Sheets("ADD")
LR = ws.Range("B" & Rows.Count).End(xlUp).Row
Dt = ws.Range("S2")
For Each C In ws.Range("E2:P2")
If C.Value = ws.Range("R2") Then
x = C.Column
End If
Next
i = 3
Do While i <= LR
If ws.Cells(i, "C") <= Dt And ws.Cells(i, "D") >= Dt Then
ws.Cells(i, "R") = ws.Cells(i, x)
End If
i = i + 1
Loop
End Sub

 

الله ينور استاذي الغالي

الف الف شكر

جزاك الله كل خير

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information