Hi,
I need to check for the data in a cell and paste it in a cell in another sheet of same workbook. Sometimes due to other conditions the data will be invisible in the cell(only visible in the formula bar). Can you please help with an VBA code to check, copy data and paste only if the data is visible in the cell.
I tried with the below query, but it is not working as expected, always returns the value eventhough if it is invisible in the cell.
If Worksheets("Sheet1").Range("A10").FormatConditions.Count > 0 Then
MsgBox "Cell is formatted"
Worksheets("Sheet1").Range("A10").Copy
Worksheets("Sheet2").Range("A5").PasteSpecial Paste:=xlPasteValues
End If
I need to check for the data in a cell and paste it in a cell in another sheet of same workbook. Sometimes due to other conditions the data will be invisible in the cell(only visible in the formula bar). Can you please help with an VBA code to check, copy data and paste only if the data is visible in the cell.
I tried with the below query, but it is not working as expected, always returns the value eventhough if it is invisible in the cell.
If Worksheets("Sheet1").Range("A10").FormatConditions.Count > 0 Then
MsgBox "Cell is formatted"
Worksheets("Sheet1").Range("A10").Copy
Worksheets("Sheet2").Range("A5").PasteSpecial Paste:=xlPasteValues
End If