بحث مخصص من جوجل فى أوفيسنا
Custom Search
|
lionheart
الخبراء-
Posts
664 -
تاريخ الانضمام
-
تاريخ اخر زياره
-
Days Won
27
نوع المحتوي
المنتدى
مكتبة الموقع
معرض الصور
المدونات
الوسائط المتعددة
كل منشورات العضو lionheart
-
In worksheet module put the following code Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row > 2 And (Target.Column = 5 Or Target.Column = 6) Then Application.EnableEvents = False Target.Value = Target.Value / 24 Application.EnableEvents = True Target.NumberFormat = "hh:mm" End If End Sub
-
Press Alt + F11 to login VBE editor From Insert menu select Module Paste the code Back to the worksheet and press Alt + F8 and click Run th execute the code
-
Sub Test() Dim r As Long, m As Long Application.ScreenUpdating = False r = 1: m = 7 Do Cells(m, 4).Resize(, 6).Value = Application.Transpose(Cells(r, 1).Resize(6).Value) m = m + 1: r = r + 6 Loop Until r >= Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = True End Sub
-
طريقة عمل شريط تمرير مع حفظ البيانات من التعديل
lionheart replied to Salem2020's topic in منتدى الاكسيل Excel
First unprotect the worksheet Select cell B8 which is related to the scroll bar form control > Right-click the cell > Format Cells > Protection tab > Uncheck the Locked option Finally protect the worksheet again -
You can directly use this line if you don't care about empty items MsgBox ListBox1.ListCount
-
Private Sub UserForm_Initialize() ListBox1.List = Range("A2:C11").Value End Sub Private Sub CommandButton1_Click() Dim c As Integer, i As Integer, t As Double Rem First Column In ListBox = 0 c = 0 For i = 0 To ListBox1.ListCount - 1 If ListBox1.List(i, c) <> Empty Then t = t + 1 Next i MsgBox t End Sub
-
You can change number 1 in this line with 3 .Range("A3").Resize(x, 1) = temp
-
معادلة تجميع جميع صفحات الملف بصفحة واحدة
lionheart replied to ford246's topic in منتدى الاكسيل Excel
Insert a module and paste the following UDF Function AutoSum(rng As Range) As Variant Dim ws As Worksheet AutoSum = 0 Application.Volatile True For Each ws In Worksheets If Not ws Is Application.ThisCell.Parent Then AutoSum = AutoSum + ws.Range(rng.Address) End If Next ws End Function Then in Total worksheet you can use the formula like that (example in cell A9 put the formula) =AutoSum(A9)- 1 reply
-
- 2
-
The code will work only if you change any cell in column T manually and the code will not be triggered when copying more than one cell Try deleting the first line in the code
-
The code is put in worksheet module not in standard module Right-click worksheet name and select [View Code] then paste the code I posted
-
In worksheet module Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.CountLarge > 1 Then Exit Sub If Target.Row > 2 And Target.Column = 20 Then Application.Goto Cells(Target.Row + 1, 2) End If End Sub
-
Replace this line Range("a10:u" & Cells(Rows.Count, "u").End(xlUp).Row).Copy With this line Range("a10:u21").Copy
-
In worksheet module Private Sub Worksheet_Change(ByVal Target As Range) Dim x If Target.Address = "$A$1" Then Columns("B:AT").Hidden = False If Target.Value = Empty Then Target.Select: Exit Sub x = Application.Match(Target.Value2, Rows(3), 0) If Not IsError(x) Then Columns("B:AT").Hidden = True Columns(x).Hidden = False End If Target.Select End If End Sub
-
Sub Test() Dim a, temp, dict As Object, buy As Double, sell As Double, i As Long, x As Long Set dict = CreateObject("Scripting.Dictionary") With Sheets("Sheet1").Cells(2).CurrentRegion a = .Value: ReDim temp(1 To UBound(a), 1 To 3) For i = 2 To UBound(a) If Not dict.Exists(a(i, 1)) Then dict.Add a(i, 1), "" buy = Application.WorksheetFunction.SumIfs(.Columns(7), .Columns(1), a(i, 1), .Columns(2), "BUY") sell = Application.WorksheetFunction.SumIfs(.Columns(7), .Columns(1), a(i, 1), .Columns(2), "SELL") If buy > sell Then x = x + 1: temp(x, 1) = a(i, 1): temp(x, 2) = buy: temp(x, 3) = sell End If Next i End With With Sheets("Sheet2") .Columns(1).ClearContents .Range("A2").Value = "Market" .Range("A3").Resize(x, 1) = temp End With End Sub
-
Private Sub CommandButton1_Click() ActiveCell.FormulaR1C1 = "10" TextBox1.Text = ActiveCell.FormulaR1C1 ExcelSpeak TextBox1.Text ActiveCell.Offset(1, 0).Select End Sub Function ExcelSpeak(sIn As String) As Boolean Application.Speech.Speak sIn, 0, 0, 0 ExcelSpeak = True End Function
-
Sub Test() Const nRows As Integer = 25, iRow As Integer = 15 Dim wb As Workbook, ws As Worksheet, sh As Worksheet, i As Integer Application.ScreenUpdating = False Set ws = ActiveSheet Set wb = Workbooks.Add(xlWBATWorksheet) For i = 1 To 10 ws.Range("A" & iRow).Value = (i - 1) * nRows + 1 If ws.Range("B" & iRow).Value = Empty Then Exit For ws.Copy After:=wb.Sheets(wb.Worksheets.Count) Set sh = ActiveSheet sh.Name = i With ws.Range("A" & iRow & ":BF39") .Copy sh.Range("A" & iRow).PasteSpecial xlPasteValues sh.Columns("BG:BH").Delete Application.Goto sh.Range("A1"), True End With Next i Application.DisplayAlerts = False With ActiveWorkbook .Worksheets(1).Delete .SaveAs ThisWorkbook.Path & "\Output", 51 .Close False End With Application.DisplayAlerts = True Application.ScreenUpdating = True MsgBox "Done", 64 End Sub
-
شاشة دخول تعمل على نظامي تشغيل 32 bit و64 bit
lionheart replied to ابن نصار's topic in منتدى الاكسيل Excel
No files attached -
Thanks a lot my bro Hassona for your reply that explains the correct steps