Hello all,I'm trying to write a VBA code that will allow me to reference column A, then find the all cells that have no data inputted. After this I want to delete said row(s). The issue that I am running into is because the data that I am using has been copied from another sheet referred to as FORMULAS where I have several formulas (IF and Vlookup) in order to get the necessary information from three sheets into 1. The Vlookup reference is up to Row 10,000. Of course when pasting this into my RESULT tab I can not long perform a Ctlr + Down Arrow shortcut to find that last cell with Data as it will automatically find Cell A10000. There are a few standard formats that I apply once the data has been copied into the RESULT tabI cannot use a find and replace function because there will be cells in columns O through AH that will not return a value due to missing data in one of the three sheets.
The code I currently am using is:
Sub Paste_Values_Format_Gtin_Out_Of_Store_Date()
' Paste_Values_Format_Gtin_Out_Of_Store_Date Macro
' This Macro copys all data from the FORMULAS tab and pastes it into the RESULT tab
Sheets("FORMULAS").Select
Range("A3").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
Sheets("RESULT").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' This portion of the Macro Selects columns G and H then removes blank characters. Then Autofits the columns
Columns("G:H").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("G:H").EntireColumn.AutoFit
Application.CutCopyMode = False
Selection.NumberFormat = "0"
'This portion of the Macro formats column P with the appropriate date format then selects cell A1
Columns("P:P").Select
Selection.NumberFormat = "m/d/yyyy"
Range("A1").Select
'This portion of the Macro resets the select in the Formulas tab
Sheets("FORMULAS").Select
Range("A3").Select
'This portion of the Macro returns to RESULT sheet
Sheets("RESULT").Select
End Sub
The code I currently am using is:
Sub Paste_Values_Format_Gtin_Out_Of_Store_Date()
' Paste_Values_Format_Gtin_Out_Of_Store_Date Macro
' This Macro copys all data from the FORMULAS tab and pastes it into the RESULT tab
Sheets("FORMULAS").Select
Range("A3").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
Sheets("RESULT").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' This portion of the Macro Selects columns G and H then removes blank characters. Then Autofits the columns
Columns("G:H").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("G:H").EntireColumn.AutoFit
Application.CutCopyMode = False
Selection.NumberFormat = "0"
'This portion of the Macro formats column P with the appropriate date format then selects cell A1
Columns("P:P").Select
Selection.NumberFormat = "m/d/yyyy"
Range("A1").Select
'This portion of the Macro resets the select in the Formulas tab
Sheets("FORMULAS").Select
Range("A3").Select
'This portion of the Macro returns to RESULT sheet
Sheets("RESULT").Select
End Sub