rounddate

  1. C

    Making a Public variable work as it should

    I'm trying to use this as a Public or Global variable colnum = Round((Date - DateValue("12/20/2017")) / 7, 0) I did this: Insert -> Module: Public colnum As Integer Function UpdateCorrectColumn() As Integer colnum = Round((Date - DateValue("12/20/2017")) / 7, 0) End Function Result: Run...
  2. C

    Would anyone know of a shorter way of doing this...

    ...maybe with a For loop that would not require repetitive statements with only two unique values that change [i.e., the Case is column number and the date] Dim d1 As Date colnum = Round((Date - DateValue("11/16/2016")) / 7, 0) Select Case colnum Case Is = 44 d1 = DateValue("9/17/2017")...

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