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

تقرير شهري


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

اخواني الاعزاء تحية طيبه كلفت باعداد تقرير شهري الى وكلاء الشركه كما في المرفق ارجو المساعده في ترحيل البيانات من الورقه 1 الى 2 بالمعادلات او كود مع الامتنان

تقرير شهري.zip

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

السلام عليكم

تمهل ياأستاذ

تفضل الكود التالي تضعه في حدث الورقة الثانية


Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Address <> "$H$3" Then Exit Sub

a = [H3]

Sheets(1).Range("$B$3:$E$105").AutoFilter Field:=4, Criteria1:=a


Dim ra As Range

Range("T10:W1000").ClearContents


Set ra = Sheets(1).Range("E3:E1000")

For Each nm In ra

	If nm.Value = a Then

    	tarikh = nm.Offset(0, -3).Value

    	qaema = nm.Offset(0, -2).Value

    	mablagh = nm.Offset(0, -1).Value

    	ii = ii + 1

    	Range("T" & ii + 10) = tarikh

    	Range("U" & ii + 10) = qaema

    	Range("V" & ii + 10) = mablagh

	End If

Next nm

'[T10].PasteSpecial Paste:=xlPasteValues



	Range("B9:R18,B24:R33,B39:R48,B54:R63").ClearContents


b = [T10000].End(xlUp).Row

	For r = 11 To b

    	m = Month(Range("T" & r))

    	x = Int((m - 1) / 3)

    	y = Int(3 * ((m - 1) / 3 - x) + 0.001)

    	Select Case y

        	Case 1

            	m_col = 8

        	Case 2

            	m_col = 14

        	Case 0

            	m_col = 2

    	End Select


    	m_row = x * 15 + 19


    	new_r = Cells(m_row, m_col).End(xlUp).Row + 1


 		Cells(new_r, m_col) = Cells(r, 20)

 		Cells(new_r, m_col + 2) = Cells(r, 21)

 		Cells(new_r, m_col + 4) = Cells(r, 22)


	Next r


   Range("T10:W" & b).ClearContents



End Sub


أو تفضل المرفق

تقرير شهري_Tareq.rar

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

استاذنا الكبير تحية واحترام اعتذر اولا" على الالحاح وعدم التريث واشكرك جدا" ثانيا" على هذا الابداع الذي ادمنا عليه في هذا المنتدى الرائع وعلى هؤلاء الرجال الرجال ادامكم الرحمن لنا منقذا وجزاكم كل خير

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

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