Good evening,
I was hoping you could assist me with editing the below macro that deletes/clears content data range in a sheet depending on time period run;
Sub Update_Format()
application.ScreenUpdating = False
'This macro pulls data to the different databases based on what time is AM/PM)
Dim x As Variant, Y As Variant, Z As Variant
If Time < 0.5 Then
[AB15].Select
ActiveCell.Value = Now
[AB16].ClearContents
Worksheets("DB PM").Select
Range("Data_Clean_PM").ClearContents
Worksheets("DB AM").Select
Range("Format_Pull_AM").Select
Else
[AB16].Select
ActiveCell.Value = Now
Worksheets("DB PM").Select
Range("Format_Pull_PM").Select
End If
x = EssVConnect(Null, Null, Null, "Tryprappro9s4.yhu.ping.Com", "Format", "Format")
x = EssVSetSheetOption(Null, 9, "0")
x = EssVSetSheetOption(Null, 11, True)
Z = EssVRetrieve(Null, Selection, 1)
Worksheets("DB Weekly").Select
Range("Weekly_Pull").Select
Z = EssVRetrieve(Null, Selection, 1)
Y = EssVDisconnect(Null)
' this is a temporal way to disconnect all. Improve when time allows.
'======
Worksheets("DB PM").Select
Y = EssVDisconnect(Null)
Worksheets("DB AM").Select
Y = EssVDisconnect(Null)
'======
Worksheets("High Level").Select
[W3].Select
application.ScreenUpdating = True
End Sub
Basically what happens in the mornings and especailly in the pm is when I run the macro it clears all contents in that specific sheet but what i am hoping you could help me with is that I have some formulas in that same sheet as well that I am hoping the edited macro would skip and only delete constant or data that is not a formula. The data that is deleted span from E3 to UI125 and I have a formula in a row from E100 all through to IU100.
I am no expect but maybe you can assist with editing the macro to delete two separate ranges so it skips the row with formulas (E100:UI100)
Thank you for your time.
Bookmarks