• 470K Members
• 4,015 Online
• 568K Conversations

## Help with simple IF THEN formula

Occasional Visitor

# Help with simple IF THEN formula

 Balance carried forward from 2018 21.00 MONTH HOURS EARNED HOURS USED HOURS USED HOURS USED HOURS USED BALANCE January 1.75 0.00 0.00 0.00 0.00 22.75 February 1.75 2.00 0.00 0.00 0.00 22.50 March 1.75 0.00 4.00 0.00 0.00 20.25 April 1.75 5.00 0.00 0.00 0.00 17.00

 Balance carried forward from 2018 21 MONTH HOURS EARNED HOURS USED HOURS USED HOURS USED HOURS USED BALANCE January 1.75 0 0 0 0 =SUM((G5+B7)-SUM(C7:F7)) February 1.75 2 0 0 0 =SUM(G7+B8)-SUM(C8:F8) March 1.75 0 4 0 0 =SUM(G8+B9)-SUM(C9:F9) April 1.75 5 0 0 0 =SUM(G9+B10)-SUM(C10:F10)

Each month 1.75 hours are earned, each week time is subtracted from the previous month’s balance.  The maximum number of hours that can be accumulated is 21.

I figured out that  =IF(G7>=21,"21")  will have it return 21 if the balance is over 21 hours.  I can’t seem to figure out how to have it show actual number of hours when they are less than 21.  I probably need to add a then statement but I can’t get it added without an error.

2 Replies

# Re: Help with simple IF THEN formula

@Tlang2010 , you may use something like

`=MIN(SUM(<hours>,21)`
Highlighted

# Re: Help with simple IF THEN formula

Specifically, the formula in G7 is:
=MIN(21,
SUM(G5,B7)-SUM(C7:F7))
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies