Forum Discussion

Queenbee86's avatar
Queenbee86
Copper Contributor
Apr 11, 2024
Solved

How to set a column to automatically add a date based on an admission date then number of weeks.

Hello,  I use excel to keep track of certain information regarding contracts, I have been able to format it to do everything I need except calculate the date based on an admission date and then the ...
  • NikolinoDE's avatar
    Apr 11, 2024

    Queenbee86 

    To achieve your desired functionality in Excel for the web, you can use a combination of formulas and data validation.

    Here is a step-by-step guide:

    1. Set up your columns:
      • Column A: Admission Date
      • Column B: Number of Weeks
      • Column C: Departure Date (auto-calculated)
    2. Enter your formula for the Departure Date:
      • In cell C2, enter the formula =IF(AND(A2<>"",B2<>""), A2+(B2*7), ""). This formula checks if both the Admission Date and Number of Weeks are entered. If they are, it calculates the Departure Date; otherwise, it leaves the cell blank.
    3. Set up data validation for the Number of Weeks column:
      • Select the cells in column B where you will enter the number of weeks (e.g., B2:B100).
      • Go to the Data tab on the ribbon.
      • Click on Data Validation.
      • Choose Whole Number in the Allow dropdown.
      • In the Data box, select Between and enter 1 and the maximum number of weeks allowed.
      • Click OK to apply the data validation.

    With this setup, users can enter the Admission Date and Number of Weeks, and the Departure Date will automatically calculate when they either move to another cell or press Enter. Data validation ensures that only whole numbers are entered for the Number of Weeks.

    This approach should work in Excel for the web, allowing for automatic calculation of the Departure Date based on the Admission Date and Number of Weeks.Formularbeginn The text and steps was created with the help of AI.

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.

Resources