DateAdd Help

abktw2

New Member
Joined
Jul 17, 2008
Messages
15
Hello,

I am looking to create a macro that will look through column BJ which has a series of date in it. I need it to select any row that the cell in column BJ is 30 days before today then cut those selections. I am just gettting familiar with the DateAdd function, but it is taking some time.

Adam
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Sorry one more thing. If it could just select cells in that row between A:BJ it would be more helpful than the entirerow command.
 
Upvote 0
You shouldn't really need the dateadd function...

Try

If Date - Range("BJ1") >=30 Then...
 
Upvote 0
Jonmo-

I am sorry I should have been more detailed. I am still very new to this whole VBA thing. I am trying to teach myself out of a book (poorly written mind you) and am not sure how to start it or what the if statement would be.
 
Upvote 0

Forum statistics

Threads
1,214,853
Messages
6,121,935
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top