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

طلب كود ملئ خلايا بمعادلات بمجرد تعبئة الخليه الاولى


gamalin

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

الاخووة الافاضل مرفق ملف 

به معادلات لحساب وزن وعدد الالواح للصاج 

مطلوب عند كتابة رقم المسلسل في الخانة a   يتم اضافة المعادلات لباقي الخانات في السطر وهكذا لعدم ادراج المعادلات وتحديد عدد اسطر دائم 

وافر التحية

تشغيل الصاج.xlsm

رابط هذا التعليق
شارك

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

تفضل اخي سيتم اضافة المعادلات للصف تلقائيا عند الكتابة في عمود المسلسل مع افراغها تلقائيا عند حدفه

Sub Fill_the_first_cell()
Dim lr As Long
Dim rng As Range
Set WS = Sheet2
Dim y As Integer
Application.ScreenUpdating = False
MH = WS.Range("A" & Rows.Count).End(xlUp).Row
With Sheet2
    For y = 8 To MH
    Cells(y, "C").Formula = "=IFERROR(VLOOKUP(B8,data!F:G,2,0),"""")"
    Cells(y, "F").Formula = "=IF(RC[-1]="""","""",RC[-1]*data!R3C[-4])"
    Cells(y, "H").Formula = "=IF(F8="""","""",G8-F8)"
    Cells(y, "K").Formula = "=IFERROR(IF(RC[-1]="""","""",RC[-3]/(7850*RC[-2]*RC[-1])),"""")"
    Cells(y, "N").Formula = "=IFERROR(IF(RC[-2]="""","""",ROUNDDOWN((RC[-3]/RC[-2])*1000,0)),"""")"
    Next y
    End With
End Sub

وهدا في حدث شيت (in)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 8 Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Cells(Target.Row, "A").Value = "" Then
Cells(Target.Row, "B").Resize(, 13).ClearContents
Else
Call Fill_the_first_cell
End If
End If
End Sub

 

تشغيل الصاج-1.xlsm

  • Like 2
رابط هذا التعليق
شارك

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