• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

Subtract Day in VBA Code

I need to subtract 1 day from Date Input or where Trade is entered it is date minus 1 day from Date Input.  Thanks in advance.



Trade = Sheets("Date Input").Range("B3")
For row = 1 To ColumnCount
           
       

         Sheet1.Cells(List, 2).Value = Trade
0
leezac
Asked:
leezac
1 Solution
 
regmigrantCommented:
If you subtract '1' from a date field Excel will return a date one day earlier than input date - this is default behaviour, what else do you need?

Trade = Sheets("Date Input").Range("B3") - 1
0
 
leezacAuthor Commented:
I think that I will just subtract a day from the input date.  Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now