Forum Discussion

Saurabh3788's avatar
Saurabh3788
Copper Contributor
Jan 19, 2025

Current date and time automatically fetched in next cell

I want to create an excel sheet to record current date, current time and temperature

Is it possible to automatically fetch current date and time in next cell on opening the sheet so that I have to only insert temperature?

  • Select Excel > Preferences > Calculation.

    Select Use iterative calculation.

    Enter the following formula in A2:

    =IF(C2="", "", IF(A2="", TODAY(), A2))

    and in B2:

    =IF(C2="", "", IF(B2="", NOW()-TODAY(), B2))

    Select A2:B2 and fill or copy down as far as you want.

    Now simply enter a temperature in column C and columns A and B will be filled in.

    See the attached demo workbook.

     

    Alternatively, you could use VBA code (in the desktop version of Excel)

Resources