RUVIDEO
Поделитесь видео 🙏

Excel VBA Visual Basic for Applications Project

VBA Analysis of big data. We have three shops with different types of products. Each shop went through several audits. We need to analyze if the shop went through an audit this month and which products were not sold.
1. Merging worksheets from three audits.
2. VBA code highlights in yellow shops that had an audit.
3. VBA code highlights products with zero results, 0 result means that this product was not sold.
4. VBA code groups all products in one list by deleting empty rows.
Here is my code:
"'Merging worksheets
Sub merge()
Dim merge, worksh As Worksheet
Dim wb As Workbook
Dim startrow, startcol, lastRow, lastcol As Long
Dim headers As Range
Set merge = Worksheets("Merge")
Set wb = ThisWorkbook
Set headers = Application.InputBox("Select the headers from worksheet", Type:=8)
headers.Copy merge.Range("A1")
startrow = headers.Row + 1
startcol = headers.Column
For Each worksh In wb.Worksheets
If worksh.Name not equel "Merge" Then
worksh.Activate
lastRow = Cells(Rows.Count, startcol).End(xlUp).Row
lastcol = Cells(startrow, Columns.Count).End(xlToLeft).Column
Range(Cells(startrow, startcol), Cells(lastRow, lastcol)).Copy _
merge.Range("A" & merge.Cells(Rows.Count, 1).End(xlUp).Row + 1)
End If
Next worksh
End Sub
Sub copyToPivot()
Dim pivot, merge As Worksheet
Set merge = Sheets("Merge")
Set pivot = Sheets("Pivot")
merge.Range("A2:E49").SpecialCells(xlCellTypeVisible).Copy
pivot.Cells(5, 5).PasteSpecial
End Sub
Sub filterData()
Dim filterindex As Variant
Dim str As String
Dim pivotf As pivotfield
filterindex = InputBox("Enter number of count")
Worksheets("Merge").Range("A1").AutoFilter Field:=3, Criteria1:=filterindex
Set pivotf = Worksheets("Pivot").PivotTables("PivotTable3").PivotFields("count")
str = filterindex
pivotf.CurrentPage = str
End Sub
Sub clearColor()
Dim lastA, i As Long
Dim rr As Range
Set rr = Range("E5:I49")
rr.Interior.Color = xlNone
clearText
End Sub
Sub clearText()
Range("E5:I49").Clear
End Sub
Sub clearTextZero()
Range("E2:I49").Clear
End Sub
'Highlights yellow shops that had audit
'Highlight burgundy products that were not sold
Sub findZeroItem()
Application.ScreenUpdating = False
Dim lastE, lastA As Long
Dim match As Boolean
Dim i, j As Long
Dim rA, rE, newRng, lastRng, zeroRng, cell As Range
lastE = Range("E" & Rows.Count).End(xlUp).Row
lastA = Range("A" & Rows.Count).End(xlUp).Row
For i = 5 To lastE
Set rE = Range("E" & i)
match = False
For j = 5 To lastA
Set rA = Range("A" & j)
If rA = rE Then
match = True
Set newRng = rE.Resize(, 5)
newRng.Interior.ColorIndex = 44
For Each cell In newRng
If cell.Value = 0 Then
Set lastRng = newRng
cell.Interior.ColorIndex = 54
For Each zeroRng In newRng
zeroRng.Copy Worksheets("Zero").Cells(zeroRng.Row, zeroRng.Column)
Next zeroRng
End If
Next cell
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub
Sub groupRows()
selectZero
Dim iCount As Long
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
For iCount = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(iCount)) = 0 Then
Selection.Rows(iCount).EntireRow.Delete
End If
Next iCount
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
Sub selectZero()
Dim lastRow As Long
lastRow = ActiveSheet.Range("E" & Rows.Count).End(xlUp).Row
Range("E2:I" & lastRow).Select
End Sub
Sub clearZeroSheet()
Dim lastA, i As Long
Dim rr As Range
Set rr = Range("E1:I50")
rr.Interior.Color = xlNone
clearTextZero
End Sub"

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Excel VBA Visual Basic for Applications Project», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.