Help me for code macro

How to check A34 have date or not?
If don’t have date ----> delete Text Data (column B34) every sheet.


Guide me about it please (macro).

Could you please show your macro code or workflow you tried?

1 Like

@Bala_Ashokan macro code : VBA Code.txt (7.9 KB)
Input : input.xls (40.5 KB)
Output : 04-2021.xlsx (27.1 KB)
*In file output I don’t text data in rowA34 every sheet.

Hi, I hope this help:

Sub check_date()

Dim ExcelWb As Excel.Workbook
Dim ExcelWs As Excel.Worksheet

Set ExcelWb = Application.ActiveWorkbook

For Each ExcelWs In ExcelWb.Worksheets
    If Not ExcelWs.Range("A34").Value Like "##.##.####" Then
        ExcelWs.Range("B34").Value = ""
    End If

Next ExcelWs

End Sub

1 Like