Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8726135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:11:24+00:00 2026-06-13T08:11:24+00:00

How would I create an macro to prompt with current date and change the

  • 0

How would I create an macro to prompt with current date and change the next cell 1 day ahead? I have a sample of what I have so far. Let me know if I am Close.

Sub Change_dates()
    Dim dtDate As Date
    dtDate = InputBox("Date", , Date)
    For Each cell In Intersect(Range("B " & dblRow).Value = dtDate, ActiveSheet.UsedRange)
        cell.Offset(0, 1).Select = cell.Offset(0, 1).Select + 1
    Next cell
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:11:24+00:00Added an answer on June 13, 2026 at 8:11 am

    This code will prompt with current date, write to active cell, then write date + 1 to cell in the next column.

    Sub Change_dates()
    Dim dtDate As Date
    dtDate = InputBox("Date", , Date)
    
    ActiveCell.Value = dtDate
    ActiveCell.Offset(0, 1).Value = dtDate + 1
    
    End Sub
    

    This will take the date from the prompt, write it in the selected rows in the range, then put the date + 1 in the rows one column to the right from the selected range.

    Sub Change_dates_range()
    Dim dtDate As Date
    dtDate = InputBox("Date", , Date)
    
    Set SelRange = Selection
    
    For Each b In SelRange.Rows
        b.Value = dtDate
        b.Offset(0, 1).Value = dtDate + 1
    Next
    
    End Sub
    

    If you instead want each row in the range to be + 1 day the row before, then I would increment dtDate at the end of the loop before the Next statement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a vim macro to do next: if I type
In short, I would either: Create a macro that runs every time a cell
How could I create a macro that would check each cell of column A,
I have a class which would create a bean and the bean has few
I need to have script.sh , that would create files f1.txt and f2.txt with
How would I create a DecimalFormat that would only have seven digits total and
How would I create an if statement within a cell that looks at another
I have created the following macro prompt in Cognos Report Studio 10.2 to grab
I would like to create a macro as such: <macrodef name=testing> <element name=test implicit=yes/>
How would I create a C macro to get the integer value of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.