What to show blank when nothing there

Robert Wyatt

Board Regular
Joined
Jul 15, 2012
Messages
84
Office Version
  1. 2019
Platform
  1. Windows
I trying to show a blank cell when there is no information I using a formula in F12:F30 but it still adds total all the way down to F30 even when there is nothing in cells A17:E17. Please help
Book1
J
12
Sheet1
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Your attempt to post your image failed. Make sure that you select the whole range you want to show before trying to post it here.
 
Upvote 0
Your mini workbook did not post correctly.
But, to give a guess at an answer to your question, wrap your formula in F12:F30 with and IF statement that check for blanks in the component calculation, IF(OR(cellA="", cellB = "", cellC ="", then "", THE-FORMULA).
 
Upvote 0
Your mini workbook did not post correctly.
But, to give a guess at an answer to your question, wrap your formula in F12:F30 with and IF statement that check for blanks in the component calculation, IF(OR(cellA="", cellB = "", cellC ="", then "", THE-FORMULA).
going to try and up load it again hope it works this time.
Work in Prograss.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1Original Date of HireYears of ServiceAnnual Accrual DaysMaximum AccrualAccral Per HoursAccrual Per-Bi Weekly PPAvailable PTO HoursYears of ServiceAnnual Accrual DaysMaximum AccrualAccrual Per HoursAccrual Per Bi-Weekly PP
204 Feb 200815252000.09627.6989.30010800.03853.08
3112960.04623.69
42151200.05774.62
5DescriptionCount5201600.07696.15
6Total Hours Accrual23.5110252000.09627.69
7Total Paid Time Off Hours Used56.00
8
9
10
11Pay Period NumberPay DateTotal HoursPTO UsedHours Accrual Balance
122612/01/2022Balance Farward 121.79
13101/05/202360-5.77127.56
14201/19/202359.558.005.73125.29
15302/02/20236548.006.2583.54
16402/16/202360-5.7789.30
17-89.30
18-89.30
19-89.30
20-89.30
21-89.30
22-89.30
23-89.30
24-89.30
25-89.30
26-89.30
27-89.30
28-89.30
29-89.30
30-89.30
31
Sheet1
Cell Formulas
RangeFormula
B2B2=DATEDIF(A2,TODAY(),("Y"))
C2C2=LOOKUP(B2,R2:R6,S2:S6)
D2D2=LOOKUP(B2,R2:R6,T2:T6)
E2E2=LOOKUP(B2,R2:R6,S2:S6/260)
F2F2=LOOKUP(B2,R2:R6,V2:V6)
G2G2=VLOOKUP(F12+100,F12:F38,1)
F6F6=SUM(E13:E38)
F7F7=SUM(D13:D38)
E13:E30E13=LOOKUP($B$2,$R$2:$R$6,$S$2:$S$6/260*C13)
F13:F30F13=IF(AND(ISBLANK(A13:D13)), " - ",IF(F12+E13-D13<$D$2,F12+E13-D13,200))
 
Upvote 0
thanks for gettign the min workbook. See my formulas in E & F 13. I don't know why the formatting is off now. but you can work on that I think.

Mr Excel Questions4.xlsm
ABCDEFGRSTUVW
1Original Date of HireYears of ServiceAnnual Accrual DaysMaximum AccrualAccral Per HoursAccrual Per-Bi Weekly PPAvailable PTO HoursYears of ServiceAnnual Accrual DaysMaximum AccrualAccrual Per HoursAccrual Per Bi-Weekly PP
23948215252000.0961538467.69230769289.3044010800.038463.07692
3112960.046153.69231
42151200.057694.61538
5DescriptionCount5201600.076926.15385
6Total Hours Accrual23.5144230810252000.096157.69231
7Total Paid Time Off Hours Used56
8
9
10
11Pay Period NumberPay DateTotal HoursPTO UsedHours Accrual Balance
122644896Balance Farward 121.79
131449316005.769230769127.5592308
1424494559.5585.725961538125.2851923
1534495965486.2583.53519231
164449736005.76923076989.30442308
17  
18  
19  
20  
21  
22  
23  
24  
25  
Sheet1
Cell Formulas
RangeFormula
B2B2=DATEDIF(A2,TODAY(),("Y"))
C2C2=LOOKUP(B2,R2:R6,S2:S6)
D2D2=LOOKUP(B2,R2:R6,T2:T6)
E2E2=LOOKUP(B2,R2:R6,S2:S6/260)
F2F2=LOOKUP(B2,R2:R6,V2:V6)
G2G2=VLOOKUP(F12+100,F12:F38,1)
F6F6=SUM(E13:E38)
F7F7=SUM(D13:D38)
E13:E25E13=IF(C13="","",LOOKUP($B$2,$R$2:$R$6,$S$2:$S$6/260*C13))
F13:F25F13=IF(C13="","",IF(AND(ISBLANK(A13:D13)), " - ",IF(F12+E13-D13<$D$2,F12+E13-D13,200)))
 
Upvote 0
Your attempt to post your image failed. Make sure that you select the whole range you want to show before trying to post it here.
Robert, i don't think this post answered your question. Can you mark the correct post?
 
Upvote 0
@Robert Wyatt In future please do not mark a post as the Solution when it does not contain one. Thanks
I have removed the "solution" from post#2. If any other post does what you need then you can mark that post instead.
 
Upvote 0
is there anyway to get a black space when using and index formula I have hopefully furnished the spread sheets that has the information on them for you to look at.

2024 Blank Time Keeper.xlsm
BCDEFGHIJ
16DayDateDescriptionTime InTime OutWorkedRegularOvertimePTO
18  ----
19  ----
20  ----
21  ----
22  ----
23  ----
24  ----
25TOTAL HOURS: ----
26
27DayDateDescriptionTime InTime OutWorkedRegularOvertimePTO
29  ----
30  ----
31  ----
32  ----
33  ----
34  ----
35  ----
36TOTAL HOURS: ----
37
38TOTAL HOURS-
39
40DescriptionRateHoursThis PeriodSocial Security Information
41Regular $ 11.75--Allowed Monthly Gross$ 1,770.00
42Stand In$ 13.75--Estimated Monthly Gross$ -
43PTO$ 11.75--Difference$ -
44Overtime$ 17.63--Allowed Annually Gross$21,240.00
45Tip Appliance$ 0.98--Estimated Annually Gross$ -
46Trainning$ 11.75--Difference$ -
47TOTAL GROSS WAGES:$ -YTD Wages, Tips$ -
Payroll Keeper
Cell Formulas
RangeFormula
B29:B35,B18:B24B18=IF(C18="","",C18)
C18C18=IF(C10="","",C10)
C19C19=IF(C10="","",C10+1)
C20C20=IF(C10="","",C10+2)
C21C21=IF(C10="","",C10+3)
C22C22=IF(C10="","",C10+4)
C23C23=IF(C10="","",C10+5)
C24C24=IF(C10="","",C10+6)
G29:G35,G18:G24G18=ROUND(IF((OR(E18="",F18="")),0,IF((F18<E18),((F18-E18)*24)+24,(F18-E18)*24)),2)
H29:H35,H18:H24H18=G18-I18
I18I18=ROUND(MAX(IF($R$14,MAX(0,SUM(H17:H$17)+G18-$Q$16),0),IF($R$14,IF(G18>$Q$16,G18-$Q$16,0),0)),2)
I19:I24I19=ROUND(MAX(IF($R$14,MAX(0,SUM(H$17:H18)+G19-$Q$16),0),IF($R$14,IF(G19>$Q$16,G19-$Q$16,0),0)),2)
G36:J36,G25:J25G25=SUM(G18:G24)
C29C29=IF(C10="","",C10+7)
C30C30=IF(C10="","",C10+8)
C31C31=IF(C10="","",C10+9)
C32C32=IF(C10="","",C10+10)
C33C33=IF(C10="","",C10+11)
C34C34=IF(C10="","",C10+12)
C35C35=IF(C10="","",C10+13)
I29:I35I29=ROUND(MAX(IF($R$14,MAX(0,SUM(H$28:H28)+G29-$Q$16),0),IF($R$14,IF(G29>$Q$16,G29-$Q$16,0),0)),2)
D38D38=SUMIFS(H18:H35,D18:D35,"Regular")+SUMIFS(H18:H35,D18:D35,"Stand In")+SUMIFS(H18:H35,D18:D35,"Trainning")+SUMIFS(J18:J35,D18:D35,"PTO")+SUMIFS(J18:J35,D18:D35,"FMLA")
J41J41=ROUND(SUM(J44/12),2)
J42J42=ROUND(SUM(F47*2),2)
J43,J46J43=IF(OR(J42=0,J41=0),0,ROUND(IF(J42>J41,0,J41-J42),+ROUND(IF(J42<J41,0,J41-J42),2)))
E41E41=SUMIFS(H18:H35,D18:D35,"Regular")
E42E42=SUMIFS(H18:H35,D18:D35,"Stand in")
E43E43=SUMIFS(J18:J35,D18:D35,"PTO")+SUMIFS(J18:J35,D18:D35,"Vacation")+SUMIFS(J18:J35,D18:D35,"FMLA")
E44E44=SUMIFS(I18:I35,D18:D35,"Overtime")
E45E45=SUMIFS(H18:H35,D18:D35,"Regular")
E46E46=SUMIFS(H18:H35,D18:D35,"Trainning")
F41:F45F41=ROUND(D41*E41,2)
F46F46=ROUND(SUM(D46*E46),2)
F47F47=SUM(F41:F46)
J45J45=ROUND(SUM(F47*26),2)
J47J47=ROUND(SUM(YTD!W4),2)
Cells with Data Validation
CellAllowCriteria
D18:D24List-,Regular,Stand In,Off,PTO,Vactaion,FMLA,Trainning
D29:D35List-,Regular,Stand In,Off,PTO,Vactaion,FMLA,Trainning
J18:J24List0,1,2,3,4,5,6,7,8
J29:J35List0,1,2,3,4,5,6,7,8
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,891
Members
449,194
Latest member
JayEggleton

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