Friends,
I have just configured a macro. But this one is not searching whether there is any value in respective "B" cell or not. Kindly add that for me. Means, Now this macro will select the current date's 2:500 cells and replace the empty cells with P. I need the Macro to search the respective "B" cell also and if there is NO value in the respective B cell, current date columns Selected Cell should be empty. Kindly help..
Private Sub Button506_Click()
Application.ScreenUpdating = False
BeginCol = 6
endCol = 37
ChkRow = 7
For Colcnt = BeginCol To endCol
If Sheet1.Cells(ChkRow, Colcnt).Value = Date Then
Sheet1.Cells(ChkRow, Colcnt).Rows("2:500").Select
Selection.Replace What:="", Replacement:="P", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Else
Sheet1.Cells(ChkRow, Colcnt).EntireColumn.Hidden = True
End If
Next Colcnt
Application.ScreenUpdating = True
End Sub
Bookmarks