BTW, just side track question is that a way we can store Conditional Formatting using Macro/VB script.
Pls refer attached, kindly advise the possibility, to create a Macro to store the Conditional format we have applied in a worksheet.
Hi David
Any reason why you would want to "store" the CF applied using VBA?
Sunny
Hi David
See if this is what you wanted.
Please note that the range, conditions, colors etc. have to be hard-coded. You will need to modify the codes to suit your needs.
Hope this helps.
Sunny
Thansk Sunny the code that's exactly what I want , I will modify the code for application.
Can we set a Macro to filter Data base on "Date" criteria
For example in the sample file we want to filter in N column [ Vendor reply]
Today' s record and date before yesterday's record?
Hi David
You did not mention which column is the date to filter. I am assuming it to be column W so change it to suit your needs.
Sub FilterByDate()
Dim ColumnNo As Long
'Change to which column with date to filter
ColumnNo = 23 '(this is column W)
Range("A1").AutoFilter
Range("A1").AutoFilter Field:=ColumnNo, Criteria1:=">=" & CLng(Date - 1), Operator:=xlAnd, Criteria2:="<=" & CLng(Date)
End Sub
Sunny
Thanks Sunny will try this VB
I did try and works OK , tks Sunny..