Result is fixed weekday

Pepestru

New Member
Joined
Sep 15, 2006
Messages
17
Office Version
  1. 2019
Platform
  1. Windows
Hi there, I have a little problem with calculating a date.
I have a cell (e.g. A1) with a date. Another cell (e.g. B1) has a number (number of days).
In cell C1 I want a new date = A1+B1. That's easy!
My question: when the date in C1 is not a Friday, the result must be the first Friday after the date (A1+B1).
A friend tells me that this can only be solved with a macro, but before trying that I wonder if someone
has a better solution with only a formula?
Thanks,
Paul
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
how about
=(A1+B1) + (6 - WEEKDAY(A1+B1))

Book1
ABCDE
11/1/2310Next Friday1/13/23
2
3a1+b11/11/23
4
5DayWednesdayFriday
Sheet1
Cell Formulas
RangeFormula
E1E1=(A1+B1) + (6 - WEEKDAY(A1+B1))
B3B3=A1+B1
B5B5=B3
E5E5=E1
 
Upvote 0
Solution
Thanks. I prefer the first solution. Simply because I can use it right away. Nevertheless I will also study the other 2 options , to get familiar to more excel functons.
Paul
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,601
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top