Excel Speedup & Optimization Tips by Experts [Speedy Spreadsheet Week]

Share

Facebook
Twitter
LinkedIn

As part of Speedy Spreadsheet Week, I have emailed a few renowned Excel experts and asked them to share their tips & ideas to speedup Excel. Today, I am glad to present a collection of the tips shared by them.

Excel Speedup & Optimization Tips by Experts

Excel Speeding up & Optimization Tips by Hui

About Hui:
Hui (Ian Huitson) has been writing & contributing to Chandoo.org for more than 2 years. Many of you know him from Formula Forensics & Data table related articles on Chandoo.org. See about Hui page for more about him.

In no particular order:

  • Minimize the use of Volatile Functions
  • Organize your workbook layout and data methodically
  • Where possible use fixed values or Named formulas instead of lookups even if the values only change rarely, flag those for manual checking
  • Don’t Start equations with a + that actually adds 0.4% calculation time
  • Minimize use of the Data Table command to running summaries only at the end of a project
  • Review the logic of the model and all if’s or lookup choices for necessity or alternatives
  • Use negatives instead of multiple positives where appropriate in conjunction with If’s and Lookups
  • Learn about Conjunctive Truth Tables, they Rock for reporting
  • Array formulas can do the work of dozens of normal cells, but use cautiously
  • Use Named Formulas and UDF’s instead of multiple Helper Cells/Rows or Columns
  • Minimize of us Conditional Formatting
  • Minimize use of linked workbooks especially if over network drives
  • Take an advanced Excel course like the ExcelHero Academy
  • Minimize the use of Excel 2007

Links:

Excel Speeding up & Optimization Tips by George

About George:
George runs Excel Unusual, where you can learn about using Excel for engineering, simulations & games. In his work, he builds complex spreadsheet models all the time. So I asked him to share a few tactics with us. He wrote 2 articles in response to my request.

Links:

Excel Speeding up & Optimization Tips by Gregory

About George:
Gregory runs Excel Semipro, where he shares Excel tips & ideas. I asked him to contribute to the Speedy Spreadsheet Week. This is what he says,

Tips by George:

To speed up my worksheet files, I have one primary rule: do not use the OFFSET function, which is volatile and can slow things down considerably. In newer spreadsheets I use Tables and The imposing INDEX function to keep ranges automatically updated. In Excel 2003 I use an event-based approach, with named ranges, the worksheet deactivate module, and VBA to keep lists and ranges updated.

Links:

Excel Speeding up & Optimization Tips by Luke

About Luke:
Luke is one of the Excel Ninjas at Chandoo.org where he contributed more than 1000 posts. I asked Luke to share some optimization tips based on his vast experience of using Excel & helping others. This is what he suggests:

  1. In VB, whenever I see a line like Selection.something that’s usually an indicator that I’m using extra lines. Either I need to apply the method directly to the object instead of selecting it, or I need to use a With statement.
  2. With Event macros, don’t forget the all-important lines of Application.EnableEvents = False and Application.EnableEvents = True so that you don’t cause multiple events to be triggered.
  3. See a section of code that you’re repeating? Probably need to make this a separate Sub or Function that you can then reference from the main code.
  4. When building your formula page, think top-down. Cells near the top of worksheet should be referenced in formulas that are below, not vice-versa. XL likes to calculate left to right, top to bottom. Scattering cell references around makes it work harder.
  5. When using large amounts of data that you want to be charted, sometimes I’ll build a formula sheet within the workbook with data, and then just build another workbook that uses a data query (referencing the formula results) to generate the charts.
  6. This might be more along the lines of auditing a worksheet, but sometimes it’s hard to see how I’ve laid out my constants and formulas, and using a worksheet map helps bring things into focus (related: create a worksheet map)

Want to become better in Excel? Join Chandoo.org courses

Excel School

Learn Excel from basics to advanced level. Create awesome reports, dashboards & workbooks.

Click here to know more

VBA Classes

Learn VBA & Macros step-by-step. Build complex workbooks, automate boring tasks and do awesome stuff.

Click here to know more

Excel Speeding up & Optimization Tips by Narayan

About Narayan:
Narayan is one of the Excel Ninjas at Chandoo.org where he contributed more than 1000 posts. I asked Narayan to share some optimization tips based on his vast experience of using Excel & helping others. This is what he suggests:

Period-to-Date and Cumulative SUMs
There are two methods of doing period-to-date or cumulative SUMs. Suppose the numbers that you want to cumulatively SUM are in column A, and you want column B to contain the cumulative sum; you can do either of the following:
You can create a formula in column B such as =SUM($A$1:$A2) and drag it down as far as you need. The beginning cell of the SUM is anchored in A1, but because the finishing cell has a relative row reference, it automatically increases for each row.
You can create a formula such as =$A1 in cell B1 and =$B1+$A2 in B2 and drag it down as far as you need. This calculates the cumulative cell by adding this row’s number to the previous cumulative SUM.
For 1,000 rows, the first method makes Excel do about 500,000 calculations, but the second method makes Excel do only about 2,000 calculations.

Subtotals

Use the SUBTOTAL function to SUM filtered lists. The SUBTOTAL function is useful because, unlike SUM, it ignores the following:
Hidden rows that result from filtering a list. Starting in Excel 2003, you can also make SUBTOTAL ignore all hidden rows, not just filtered rows.
Other SUBTOTAL functions.

Using SUMPRODUCT to Multiply and Add Ranges and Arrays.
In cases like weighted average calculations, where you need to multiply a range of numbers by another range of numbers and sum the results, using the comma syntax for SUMPRODUCT can be 20 to 25 percent faster than an array-entered SUM.
{=SUM($D$2:$D$10301*$E$2:$E$10301)}
=SUMPRODUCT($D$2:$D$10301*$E$2:$E$10301)
=SUMPRODUCT($D$2:$D$10301,$E$2:$E$10301)

These three formulas all produce the same result, but the third formula, which uses the comma syntax for SUMPRODUCT, takes only about 77 percent of the time to calculate that the other two formulas need.

Dynamic Ranges

These are most often created using the OFFSET and COUNTA functions , as in the following :
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A)-1,1)

Sometimes , when data is stored in the form of records , so that all columns have data to the same extent , there may be several dynamic ranges ; say we have ORDER_ID in column A , CUSTOMER_ID in column B , and the AMOUNT in column C. Thus there may be several dynamic ranges as follows :
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A)-1,1)
=OFFSET(Sheet1!$B$1,0,0,COUNTA(Sheet1!$B:$B)-1,1)
=OFFSET(Sheet1!$C$1,0,0,COUNTA(Sheet1!$C:$C)-1,1)

These can be simplified to :
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A)-1,1)
=OFFSET(Sheet1!$B$1,0,0,COUNTA(Sheet1!$A:$A)-1,1)
=OFFSET(Sheet1!$C$1,0,0,COUNTA(Sheet1!$A:$A)-1,1)

These can then be optimized by storing the COUNTA value in a cell , and using the cell reference within the OFFSET formula :
=OFFSET(Sheet1!$A$1,0,0,Sheet1!$F$1,1)
=OFFSET(Sheet1!$B$1,0,0, Sheet1!$F$1,1)
=OFFSET(Sheet1!$C$1,0,0, Sheet1!$F$1,1)

Where Sheet1!$F$1 contains the formula : =COUNTA(Sheet1!$A:$A)-1
For more, refer to MSDN.

Resetting the USED RANGE

Pressing CTRL END will take the cursor and place it on the cell which Excel thinks is the last used cell in the worksheet.
Suppose you do this , and the cursor lands on D27 ; now navigate to any cell which is as far away as you can imagine , say AA3456 ; enter any character , even a space will do ; then clear the cell contents by pressing the DEL key.
Pressing CTRL END will now take the cursor to AA3456.
To reset the USED RANGE , go to the Immediate Window of the VBA Project , and enter the following statement :
Application.ActiveSheet.UsedRange
Your used range should now be reset to its earlier value of D27 ; pressing CTRL END will now take the cursor to D27.
Refer to this Stackoverflow discussion for more.

Excel Speeding up & Optimization Tips by Jordan

About Jordan:
Jordan runs Option Explicit, an Excel VBA blog. He shared these tips with us,

  • When reading and writing to ranges, use .value2 (this is noticeable for large, iterative calculations)
  • Ensure that ALL spreadsheet errors are handled. The most common errors I see ignored are #Ref errors and #Div (for dividing by zero). Use Go To Special… to find these errors and either delete them or use IFERROR to handle them. In my opinion, Excel errors are one of the biggest contributing factors to slow spreadsheets.
  • When using INDEX, include the row or column number even if you don’t need it. For example, if I’m pulling data from only one column, I need only write =INDEX(A1:A10, 1) to pull the first item. However, =INDEX(A1:A10, 1, 1) appears to be a hair faster. Try it.
  • Cut down on Lookup functions. In many instances, the lookup table has already encoded information in the correct order. Instead of looking up, say, Stage 2, just use INDEX on the desired column and pull from row 2.

Thanks to Hui, George, Gregory, Luke, Narayan & Jordan

Many thanks to all of you for sharing these ideas & tips so that we can speed up Excel. If you found these tips useful, say thanks to the contributors.

More on Excel Optimization & Speeding up:

Read these articles too,

Want to become better in Excel? Join Chandoo.org courses

Excel School

Learn Excel from basics to advanced level. Create awesome reports, dashboards & workbooks.

Click here to know more

VBA Classes

Learn VBA & Macros step-by-step. Build complex workbooks, automate boring tasks and do awesome stuff.

Click here to know more

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

99 Responses to “How to use Date & Time values in Excel – 10 + 3 tips”

  1. [...] Date with my sheet - 10 tips on using date / time in excel (tags: excel totw) Posted in Uncategorized | [...]

  2. [...] More on date / time: 10 tips on using, formatting date / time in excel. [...]

  3. Vijay Sharma says:

    Hi Chandoo,

    Since this article was for Dates, below are 2 easy ones to calculate the Start and End of Month. (without using the EOMONTH formula as available in Analysis Toolpak).

    In Cell A1, put any date
    then in the cell where you would want the Start of Month put the below formula
    1. Start of the Month
    =DATE(YEAR(A1),MONTH(A1),1)

    2. End of Month
    =DATE(YEAR(A1),MONTH(A1)+1,0)

    Hope this would help a lot who were dependant of EOMONTH..

    cheers
    ~Vijay

  4. David B says:

    I run a trolley tour business and need to set up a data base to track tickets sold by mutable vendors (from store, on the street ,etc)and by class ( adult, senior,child and discounts ) can you help or direct me to one that could?

  5. Glenn says:

    I know how to write macro's for excel, but I have 1 issue that I cant figure out and would appreciate some help.
    I want to key a range of dates, (7/1/09-7/12/09) then write a macro to go find the info for that range and bring it back to my spread sheet.

    Thanks for any help....

  6. Chandoo says:

    @Glenn: you can try a user defined function if the information you want to gather can be derived only from the 2 dates entered. You can write a macro, if you need to refer to other ranges in the workbook to gather the info based on the dates entered. I am not sure what you meant by "go find the info for that range". May be if you tell what you are trying to find, I can suggest the approach for writing a macro...

  7. [...] Important excel formulas: IF and Then, Vlookup, Offset, Sumif, Countif, Working with date and time [...]

  8. [...] Tips on using date & time in excel, List of excel date & time formulas, More excel quick tips [...]

  9. sekhar says:

    talking about dates, therz a formula that i use very frequently to calculate the difference between two dates.
    its not documented in 2007 though

    =DATEDIF(START_DATE,END_DATE,"Y") - gives you the years
    =DATEDIF(START_DATE,END_DATE,"YM") - remaining months
    =DATEDIF(START_DATE,END_DATE,"MD") - remaining days

    im sure you'll know this. wonder why it isnt documented. works fine with 2003 and 2007

  10. Ray Solanki says:

    Help please... I have two dates eg: 1/8/10 - 10/8/10 and i would like to know the number of Fridays and Mondays in any given period

  11. Hui... says:

    Ray

    Try the following user defined function:
    ===

    Function NoMonFri(uStart As Range, uEnd As Range, Optional uType As Integer) As Double
    Count = 0
    For i = uStart To uEnd Step 1
    If Weekday(i) = 2 Or Weekday(i) = 6 Then Count = Count + 1
    Next i
    If uType = 1 Then
    If Weekday(uStart) = 2 Or Weekday(uStart) = 6 Then Count = Count - 1
    If Weekday(uEnd) = 2 Or Weekday(uEnd) = 6 Then Count = Count - 1
    End If
    NoMonFri = Count
    End Function

    ====
    Copy the above into a Code Module
    To use just enter
    =NoMonFri(A1, A2) or
    =NoMonFri(A1, A2,1)
    Where A1 & A2 are the Start and End Dates (inclusively)
    The use of the optional 1 will Exclude the Start and End dates

  12. Chandoo says:

    @Ray... You can also do this using SUMPRODUCT (ahem)

    Assuming first date is in C6 and second date is in C7,

    =SUMPRODUCT(--(MOD(WEEKDAY(ROW(INDIRECT(C6&":"&C7)),2),4)=1))

    Will give you the number of Mondays and Fridays between C6 and C7 (including both days)

    Also, checkout NETWORKINGDAYS() UDF for more complicated counting... http://chandoo.org/wp/2009/06/09/networkingdays/

  13. [...] Process your data: Assuming your data looks like what I shown to left, just use simple formulas to make it look like the table to right. [related: how to work with dates & times in excel] [...]

  14. Javed Iqbal says:

    very useful tip, thanks alot

  15. Chandra Shekar B says:

    Hello Chandoo,

    How to convert no into time. for ex: 3600(In Seconds) into 1:00:00

    Thanks,

    Chandra Shekar B

  16. Hui... says:

    @Chandra
    Times are a fraction of 1
    So 6am is 0.25
    12 noon is 0.5
    6pm is 0.75
    So convert hrs and mins to a fraction of 24 hrs
    1 Hr = 1/24
    3600 seconds = 3600/(24*3600)
    etc

  17. Chandru says:

    Hello Hui,

    Thanks a lot 🙂

  18. Patrick says:

    Hello,

    I cant get Point 6 above to work (highlighting weekends).

    Is there an actual example I can see in action anywhere?

    Otherwise a very helpful and informative website.

    Regards,

    Patrick

  19. Avinash says:

    Hi Chandoo,

    When discussing about time.. I have one question too. Basically, I have one sheet in which we enter "Shift IN" & "Shift OUT" times as "hh:mm" format in A and B columns and next columns C & D pulls the scheduled and present count of agents from other sheet by VLOOKUP-ing times as

    IN time (hh:mm) - OUT Time (hh:mm). For eg; 03:30 - 12:30

    Columns A and B have been validated to accept only values between 00:00~23:30 (half hour intervals). and when pasting data, the values are usually accepted and I don't get any errors of validation.
    But, when performing vlookup to get the number of scheduled agents say as of the time interval 03:30, I get an #N/A error. I have confirmed ranges are all fine, but what I found is that the time although shows same but they are actually of different days. Say for eg;

    41023.39583 gives 9:30
    41024.39583 gives 9:30 too..

    Validation is accepted as time is same, and it works fine if I select the time interval from the validation list. So, was wondering, if I can select the same interval from the list using VBA.. so that whatever the time intervals gets updated, I just need to run a macro to automatically select the interval from the validation list.. I have come across that we can use Cell.Validation.Formula1 in some manner to get the item from list.. but it would take the number of the item in the list.. wondered if I could get the item through text. Any ideas to accomplish this task?

    Regards,
    Avinash

    • vishwanatha says:

      in time - 9:30 am on 11/24/2015
      out time - 6:30 am on 11/25/2015

      I have to calculate total hours worked.

      Tell me the formula to calculate the total hours, please.

  20. sheila villena says:

    hi, 

    can you help me in, i just want to know how will i get the corresponding DAY when i entered a specific DATE?

    Thanks,

    Sheila 

    • Chander J says:

      Hi,

      Following could be a solution for findinng out correspoinding Day, Month & Year to a Date:

      =TEXT("CELL ADDRESS WHERE DATE IS PLACED","DDDD") ..... For Day

      =TEXT("CELL ADDRESS WHERE DATE IS PLACED","MMMM") ..... For Month

      =TEXT("CELL ADDRESS WHERE DATE IS PLACED","YYYY") ..... For Year

      One can also customized the view by reducing keywords which will promopt to the following results : Mon, J, Jan, 2007, 07 etc

  21. Navin says:

    hi,
    sir can u help me,
    how to set a validity period & date of time in microsoft excel.

    eg:- suppose i m using a file sheet and setting a date of 01.04.2012, time 12.00am & wan't dat the sheet should stop working in 1 month  date & time ( 30.04.2012 ).

    eg :- suppose we are going internet cafe dere we are taking a browsing of 1hour time, as we r close 2 our time d browsing stop working.

    in dis way i wan't sheet to be set by date & time.

    so pls help me how to do.

    thanks,
    navin.
     

  22. Suyash says:

    Hi,
    Sir ur article is very helpful....Thnaks for that but i need ur help in this one. i have a monthly report workbook and the sheets are saved by date of that month. I have two cells FromDate and ToDate through which opening and closing stock is calculated(using =SUM('01-09-2012:25-09-2012'!D7)+ SUM('26-09-2012:30-09-2012'!D8)) .....Please give me a formula when i will enter any date in ToDate  or FromDate cell it will automatically change the other cells formula so to give me sum.
    please help me
    thanks
    Suyash

  23. Azwa says:

    Hi Mr. Chandoo,

    I have 1 question. I have 1 pivot table, successfully done with your guidelines, but how to set Sunday as the start week? means the start day is Sunday, and the end day of the week is Saturday.

    TQ in advance. 
        

  24. Charlotte says:

    can someone please tell me that if i want the date of the month to appear on each sheet of my workbook how do i do it by itself? i mean the workbook is of meeting room bookings... so i want to print out sheets date wise for a whole year/

  25. [...] So the formula for end time cell is =start-time + duration-minutes / 24 / 60. Note: We need to divide by 24 & 60 because in Excel each day 1 number, each hour is 1/24th and each minute is 1/24/60th. [learn more about Excel dates] [...]

  26. niyas says:

    dear friends, please help me to calculate actual time within the range while actual time more or less of range?

     
     
     
     

    TIME IN
    TIME  OUT
    ACTUAL HRS
    ACUTAL HRS WITHIN RANGE (7:30:00 to 18:00:00)

    7:15:00
    18:15:00
    11:00:00
    ?

    7:45:00
    17:00:00
    9:15:00
    ?

     
     
     
     

  27. Saransh says:

    If I have dates in Indian format dd-mm-yyyy, excel is not recognizing the same and instead treating the same as mm-dd-yyyy so a date mentioned in Indian system as 09/06/2013 is being treated as 6-Sep-2013 whereas it actually represents 9-Jun-2013.
    Can I convert these dates in Indian format to corrected dd-mmm-yyyy system?

  28. maged says:

    Chandoo,

    Please i need an advise ASAP i have been using this statement and it cant help

    if(and(c1>=a1:a144,c1<=b1:b144),"yes","no"))

    and it just works for the first 2 values c1, c2 and doesn't fit for the others.
    the case is i have more than one event at the same video and i need to confirm that no event was taken unless it is between start and end.

    here are some samples:

    Start dtime End Dtime Event Dtime
    16/09/2013 22:13:34 16/09/2013 22:14:18 16/09/2013 22:13:38
    16/09/2013 22:15:57 16/09/2013 22:24:30 16/09/2013 22:16:02
    16/09/2013 22:24:30 16/09/2013 22:33:49 16/09/2013 22:17:32
    16/09/2013 22:33:53 16/09/2013 22:35:05 16/09/2013 22:19:02
    16/09/2013 22:35:05 16/09/2013 22:39:57 16/09/2013 22:20:02

    So as you can see there are more than one event between one start and end dtimes

    thanks guys

  29. Chandresh says:

    Hi Chandoo,

    I have an activity tracking sheet, in which column A has activity A, B, C, D & E and column B has start date, column C has start time, column D has end date & column E has end time. Now what i am trying to do is that suppose activity A starts on 31-Mar 9:00 AM and finishes an 4-Apr 5:00 PM and Activity B starts only after A completes, but if suppose Activity A is delayed by say 1 hour, then activity B, C, D & E which are all dependent on each other will also be delayed by 1 hour, i want to create a template in excel, could you please help?

    thanks

    Chandresh

  30. […] Day 32 Date and time arithmetic - The symbols / and – need to be used when inputting dates and Excel has the capability to add dates and times together too. Follow the Excel Easy article here on how http://www.excel-easy.com/functions/date-time-functions.html Chandoo also has some Top 10 tips too http://chandoo.org/wp/2008/08/26/date-time-tips-ms-excel/ […]

  31. Rokon says:

    Hi,
    What will b the formula to get the date more than 3 yrs from the present date ?

    Example : today is 16-05-2014 (D-M-Y) then three yrs later what will be the date.

  32. Rokon says:

    Hi,
    What will b the formula to get the date more than 3 yrs from the present date ?
    Example : today is 16-05-2014 (D-M-Y) then three yrs later what will be the date.

  33. chetan says:

    hi..i want to restrict excel from counting non working time.... so i can prepare end dates for a PROJECT if i have total working hours required for my project..

    thank for reply if any....

  34. Kalaivanan says:

    Hi,
    Good Morning,
    Please use the formula for the below mentioned format in excel.
    Formula :- =TEXT(H3,"dd-mmmm-yyyy").
    Format :- 17-September-2014

  35. Andres Parra says:

    I'm an evaluator and i evaluate about 20 people everymonth between 6-10 times each depending on their performance. i track my work in excel by adding the dates i did each peorson. The only rule that i have its that i cant evaluate a person back to back so i have to wait at least one day in between each evaluation. is there a formula where excel would not allow me to enter a date if its one day after the date of the cell to the left?

  36. jayson says:

    Could anyone please help me. I have not been able to find a format that I need. I need to subtract a value everyday. Example. If I have 365 dollars and I would like Excell to subtract 1 dollar everyday for a year I would have 0 dollars left at the end. Or even 7 dollars a week would work for me. Could anyone please help me on this formula. Thanks

  37. Laly says:

    Is there a simple way (no function) to define a formula in a cell like =F(22/08/2014) ?

    Currently, i put the date 22/08/2014 in a cell eg. B2 and do my formula a =F(B2).

    Thanks

  38. BOOSTSATHIS says:

    Hai,

    I am sathis Kumar , i want to subtract two dates in xl sheet from 05/11/2013 to 30/04/2014 . now i want two days between how many month

    DOJ DOL Experince
    01/11/2013 05/06/2014 = (05/06/2014 - 01/11/2013)

  39. sankar says:

    Sir, I am trying to figure out how I can prevent user to enter duplicate date (in a pre booking template). The conditions are
    1) User A can put a single date or a date range
    2) Other user can't pick any day in between whatever user A had chosen
    3) A date picker calendar always shows only next 20 days date
    Can you please help me
    thanks in advance

  40. SM Frye says:

    Dear Sir,

    I am trying to update a 2014 historical facts calendar (It has a fact for every day of the entire year.) to reflect the new dates and days of the week for 2015. Is there a single formula I can enter to shift the dates ahead for the entire annual calendar, or do I need to execute a formula at each month's start? Either way, I am also in need of a formula to achieve this.

    Thanks for your help.

  41. […] Date with my sheet – 10 tips on using date / time in excel – Excel date time features are very handy and knowing them a little in depth can help you save a ton of time in your day to day spreadsheet chores…. […]

  42. LALIT SHARMA says:

    sir, suppose a date are given in a cell A1 = 20/04/2013... and suppose I want to add 10 years or 10 years and 07 month then how can I add the above ........ so that I Show 21/04/2023..... please justifiee.. sir...

    • Hui... says:

      @Lalit

      If A1 has a date 20/04/2013
      simply
      =A1+date(10,0,0) for +10 Years
      =A1+date(10,7,0) for +10 Years, 7 Months
      =A1+date(10,7,5) for +10 Years, 7 Months 5 days etc

      • Hui... says:

        @Lalit

        If you want to be more precise
        =A1+date(0,120,0) for +10 Years
        =A1+date(0,127,0) for +10 Years, 7 Months
        =A1+date(0,127,5) for +10 Years, 7 Months 5 days etc

  43. LALIT SHARMA says:

    and suppose... tow dates are given .. 20/04/2013 and 27/08/2003.. then how can seprate (-) kare so that the answer should be return in month.. ... it anser of both question are possible to sent the mention email then pls sent the answer in mention e-mail... .. I shall be highly obeliged ...

  44. Zarin says:

    Dear Sir,

    What is the formula using the Data Validation function at excel, to restrict a cell to accept only 2 days of the months (1st and 16th of the month)? Appreciate your kind help. Thanks.

  45. Thang says:

    Hi Pro, i want to find day if given date and weekday. example : Given Tuesday, 31week, 2015 year. Result is 28/7/2015, pls help me!

    • Ron says:

      please help
      i trying to write a formula for dates

      i have a initial date and i am trying to auto populate for 6 months out and one for 9 months out and have the 6 months out change color and when it is 9 months out change another color

      please help

  46. amy says:

    I have an Excel workbook for Study room bookings and within it I have 6 worksheets Monday thru Saturday. Without having to create 365 worksheets with individual dates on them what formula can I print these worksheets with the dates for the remaining days of the year automatically populated or is it possible?

  47. Elyse says:

    Is there a way to take 2 dates and subtract the newest date from the oldest to get the number of days difference? I tried the one that it says on this page but it didn't work.

  48. Suresh Ramachandran says:

    how to highlight days a month which is greater than 10th of every month

  49. Jenny says:

    Hi,

    How can 1 cell can put 2 dates by date format.
    I have the problem of 1 customer make 2 times payment.
    I can only record as 01/06/2016 & 02/06/16.
    The problem is when i filter that cell can't appear

    • Hui... says:

      @Jenny
      It is poor practice to store multiple records in one cell
      It is much easier to store multiple records ion multiple rows
      That also allows flexibility in reporting

      When entering data in a record that is mostly similar to the record above, you can use the Ctrl+D shortcut, This duplicates the cell directly above you speeding up data entry

  50. piecevcake says:

    Hello,
    Could you please tell me the solution to this? I have spent months, years, looking for it...
    When I press ctrl+; to enter the date in a cell, I want it to enter d/M/yy. My short date in windows regional settings is d/M/yy. Excel enters d/M/yyyy. The cells must be formatted as text they cannot be formatted as date. I do not want to have to macro-enable my workbooks, There must be a setting in the registry to set this?

    Alternatively, how can I assign that key to my own shortcut for a macro to enter NOW with custom date format? Can't find that either!
    I hope you can help!
    Many thanks

  51. NIRAJ says:

    how to shift date to the next working day if time goes after the working hour. if cell a1 has reference date and time i.e. 04/02/2017 12:30:00
    and cell b1 has working duration i.e. 7 hours . it shows in cell C3 04/02/2017 19:30:00 but 19:30:00 is not our working time. i want to show the value of plan date as 05/02/2017 11:30:00 . working time id 09:00:00 to 17:00:00

    Thanks

  52. Ernst says:

    No Comments at this time

  53. ANAND says:

    I have to develop Calendar in Excel considering Monday being the First day of week . How I can develop the same ? Please provide me guidance .

  54. Kirst says:

    Hi Chandoo!
    I export incident data daily to Excel 2016 and the dates are text (e.g. 8 Apr 2018). I changed cell to short date field format, but it still recognises this as text until I 'F2' then 'Enter' in each cell. Is there a more efficient way to do this; I have 3 columns of dates and about 1000 lines of data.
    I need it to be dates so I can then create pivot tables and charts from the data.
    Many thanks,
    Kirst.

  55. Mark says:

    some things I find useful:

    INT this will give you the date part of a datetime field
    MOD this will give you the time part of a datetime field

    if you had

    21/06/2018 10:25:00

    in cell a1

    then =INT(A1) would give you 21/06/2018
    and = mod(a1,0) would give you 10:25:00

  56. Sandeep Kothari says:

    oSUM!

  57. David says:

    The most important thing is if you do any calculations you need to be careful, given the vagaries of floating point math.

    e.g. depending on the day you choose, 4pm minus 3pm may be less than, equal to, or greater than one hour.

    Results in some infuriatingly subtle bugs when you forget!

  58. How do we know says:

    Wow! Came here from India's top blogs and this is superb! For some reason, dates have always confounded me in Excel and this was exactly what I needed - esp the section on adding and subtracting dates. Thanks a ton!

  59. Kale says:

    Hi,

    I have a mixed combinations of date format in one column i.e. 'dd/mm/yy' and 'mm/dd/yy'. How do I make them all in the same format, either all in 'dd/mm/yy' format, or all 'mm/dd/yy' format? Thanks in advance!

  60. Nirmal Christian says:

    want to conditional format and highlight all sunday and only second and fourth saturday in the list of given dates

  61. Bjarne says:

    Hey

    have can i work with this time format
    tt:mm:ss,000

  62. tom says:

    I want to develop a formula that will enter a an(hour and minute-not to change) in a cell when any data is entered in another specific cell. This will be used to determine lengths of time between three events
    Thanks,
    Tom

  63. AnnMarie Dixon says:

    I need to input in Excel formula for the date as follow: 2019/2020. The period for each year is July - June. I would need a formula that can change each period.

  64. AnnMarie Dixon says:

    I need to input in Excel formula for the date as follow: 2019/2020. The period for each year is July - June. I would need a formula that can change each period.
    The formula for date to change each year November 1, Year.

  65. Kamlesh Dantani says:

    Hi,
    Option 1 is very much helpful for me.
    I look this type of formula on google since many times but not satisfied.
    Finally I found it.
    Thank you ?so much,
    Kamlesh Dantani

  66. CoreyWilley says:

    Great website. These excel formulas, not just this page, have been super helpful while going through old spreadsheets and finding data. Thanks for the info.

  67. Very informative. Date functions are very important. I frequently visit your articles...awesome. Go ahead.

  68. Nice content, keep sharing with us.

  69. Sidharth Agarwal says:

    Hi Chandoo,

    Need a small help to build a formula where we can show the date of Monday i.e. start of week date from time stamp for eg "3/2/2022 9:21 PM" or either from "Week 10'2022" where Week is for entire year i.e till week 52/53 and "2022" represents the year

    Thanks in advance

    Best
    Sid

  70. Mac says:

    Hello,
    is the format of date case sensitive dd and DD are the same???

Leave a Reply