http://msdn.microsoft.com/en-us/library/windowsphone/develop/gg442300(v=vs.105).aspx
Tuesday, December 31, 2013
Wednesday, December 04, 2013
Sub EraseEmptyRows()
Dim rw, i
For i = 1 To 5
' Here the loop is up to 5 meaning the maximum number of rows with no data would be 5
' Increase this number when necessary
For Each rw In Worksheets(1).Range("A1:A50").Rows
' Sweeps all cells in the range. Change the range when necessary
If (IsEmpty(rw.Cells(1, 1))) Then rw.Delete
' Erases if the cell is empty
Next rw
' End for rw loop
Next
' End for i loop
End Sub
Dim rw, i
For i = 1 To 5
' Here the loop is up to 5 meaning the maximum number of rows with no data would be 5
' Increase this number when necessary
For Each rw In Worksheets(1).Range("A1:A50").Rows
' Sweeps all cells in the range. Change the range when necessary
If (IsEmpty(rw.Cells(1, 1))) Then rw.Delete
' Erases if the cell is empty
Next rw
' End for rw loop
Next
' End for i loop
End Sub
Posted on 7:53 PM by Erdem
Public Sub Add_Data_to_rows()
' Procedure to add data to rows
' Use this to understand how .Rows work
Dim rw
' Initiate a variable to use as rows object
For Each rw In Worksheets(3).Range("A1:C100").Rows
' Select each row starting from 1 on page 3
rw.Cells(1, 1).Value = "ABC"
' Set the value to "ABC"
Next rw
' End for loop for rw
End Sub
' Procedure to add data to rows
' Use this to understand how .Rows work
Dim rw
' Initiate a variable to use as rows object
For Each rw In Worksheets(3).Range("A1:C100").Rows
' Select each row starting from 1 on page 3
rw.Cells(1, 1).Value = "ABC"
' Set the value to "ABC"
Next rw
' End for loop for rw
End Sub
Posted on 1:18 PM by Erdem
' Function to erase empty rows in excel
' !!Currently it checks second work sheet!!
' Checks the first cell and erases the entire row if the cell is empty
'Simply copy this macro to your excel file
Sub EraseEmptyRows()
Dim MyCheck, rw, this, i
For i = 1 To 50
' Scan through rows 1 to 50
For Each rw In Worksheets(2).Cells(i, 1).CurrentRegion.Rows
' Select each row starting from 1 on page 2
this = rw.Cells(1, 1).Value
' Copy the value of A cell
MyCheck = IsEmpty(this)
' Check if the cell is empty
If MyCheck Then rw.Delete
' If it is, erase entire row
Next rw
' End for loop for rw
Next i
' End for loop for i
End Sub
Posted on 8:52 AM by Erdem
Subscribe to:
Posts (Atom)