Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to count table columns in Excel
  • How to calculate average last N values in a table in Excel
  • Reverse List in Excel
  • Working With Tables in Excel
  • Move chart to a separate worksheet in Excel

References

  • How to get address of last cell in range in Excel
  • How to create dynamic named range with OFFSET in Excel
  • Count rows that contain specific values in Excel
  • How to get first column number in range in Excel
  • Vlookup Examples in Excel

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation exists in list
  • Excel Data validation must not contain
  • Excel Data validation whole percentage only
  • Excel Data validation must contain specific text

Roll back weekday to Friday base on a particular date in Excel

by

Case study:

If Monday, roll back to Friday

To check the weekday of a date, and roll back to Friday when the date is a Monday, you can use the IF and WEEKDAY functions.

Formula

=IF(WEEKDAY(date)=2,date-3,date)
If-Monday-roll-back-to-Friday Roll back weekday to Friday base on a particular date in Excel

Explanation

In the example shown, the formula in C5 is

=IF(WEEKDAY(B5)=2,B5-3,B5)

How this formula works

The WEEKDAY function returns a number, 1-7, that corresponds to particular days of the week. By default, WEEKDAY assumes a Sunday-based week, and assigns 1 to Sunday, 2 to Monday, and so on, with 7 assigned to Saturday.

In this case, we only want to take action if the date in question is Monday. To test, we use this expression inside the IF function:

WEEKDAY(B5)=2

If the logical expression returns TRUE, we know the date is a Monday, so we subtract 3 to “roll back” to Friday. If the expression returns FALSE, we simply return the original date.

Post navigation

Previous Post:

Get day from date in Excel

Next Post:

Calculate loan interest in given year in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation
  • How to use IFS function in Excel
  • Not Equal To ‘<>‘ operator in Excel

Date Time

  • Add days to date in Excel
  • Display the current date in Excel
  • Add days exclude certain days of week in Excel
  • Get fiscal year from date in Excel
  • Add business days to date in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • Group times into unequal buckets in Excel
  • Group arbitrary text values in Excel
  • Calculate conditional mode with criteria in Excel
  • Running count group by n size in Excel

General

  • Customize Ribbon In Excel
  • Flash Fill in Excel
  • How to calculate profit margin percentage in Excel
  • Print Excel Sheet In Landscape Or Portrait
  • How to generate random number weighted probability in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning