PHP String operators | PHP tutorial lesson - 19 | String operators in PHP

preview_player
Показать описание
PHP String operators | PHP tutorial lesson - 19 | String operators in PHP
#php #phpforbeginners #phptutorial #computergyanguruji
Our second channel
Our Shorts channel
Follow us on
instagram
Twitter
Facebook
MS Excel Videos
MS Excel for Beginners
Excel VBA
MS Word
MS PowerPoint
MS Access
MS Paint
MSW Logo
Notepad & HTML
CSS
JAVA
PHP
Python
Photoshop
Full Tutorial
Computer Education
Other
Tally
Internet
Computer GK
Google Sheet
Invoice in Excel
Reasoning
Airthmatics
Рекомендации по теме
Комментарии
Автор

Sir this code is copying data multiple times, please assist. I want a VBA code that can copy data from all tabs in the workbook containing value as 'Agency' in column 'I' and paste those rows in separate sheet.

Sub ExtractData()
' Declare variables
Dim wsSource As Worksheet, wsTarget As Worksheet
Dim rngSource As Range, rngTarget As Range
Dim lRow As Long, i As Long
Dim cell As Range

' Set the worksheets
Set wsSource =
Set wsTarget =

' Set the source range
Set rngSource = wsSource.Range("A1:I1000")

' Find the last row in the target sheet
lRow = wsTarget.Cells(wsTarget.Rows.Count, "A").End(xlUp).Row

' Set the target range
Set rngTarget = wsTarget.Range("A" & lRow + 1)

' Loop through the source range
For Each cell In rngSource
' Check the criteria
If wsSource.Cells(cell.Row, "I").Value = "Agency" Then
' Copy the data
cell.EntireRow.Copy rngTarget
' Move to the next row in the target range
Set rngTarget = rngTarget.Offset(1, 0)
End If
Next cell

' Loop through the other sheets
For i = 2 To
Set wsSource = ThisWorkbook.Worksheets(i)
Set rngSource = wsSource.Range("A1:I1000")
lRow = wsTarget.Cells(wsTarget.Rows.Count, "A").End(xlUp).Row
Set rngTarget = wsTarget.Range("A" & lRow + 1)
' Loop through the source range
For Each cell In rngSource
' Check the criteria
If wsSource.Cells(cell.Row, "I").Value = "Agency" Then
' Copy the data
cell.EntireRow.Copy rngTarget
' Move to the next row in the target range
Set rngTarget = rngTarget.Offset(1, 0)
End If
Next cell
Next i
End Sub

Nirvana