iferror and =aggregate formulas not working

Hopey87

New Member
Joined
Mar 7, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Morning,

I am trying to add hours however some cells have #N/A (this is due to a formula already there awaiting data). I have used =AGGREGATE(9,6,E4:E34) and =SUM(IF(ISNA(E4:E34),0,E4:E34)) however they both are equalling 0, even though there are hours. total hrs have a formula =TEXTAFTER(B4, "x")
1710195731376.png
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Does this work for you:

Book1
ABCDEF
1DecemberRosteredTotal HoursActualTotal HoursAdditional Hours
22023-12-018x8.58.58x8.58.5
32023-12-028x8.58.5#N/A#N/A
42023-12-03#N/A#N/A#N/A
52023-12-04#N/A#N/A#N/A
62023-12-05#N/A#N/A#N/A
72023-12-06#N/A#N/A#N/A
82023-12-07#N/A#N/A#N/A
92023-12-08#N/A#N/A#N/A
102023-12-09#N/A#N/A#N/A
112023-12-10#N/A#N/A#N/A
122023-12-11#N/A#N/A#N/A
132023-12-12#N/A#N/A#N/A
142023-12-13#N/A#N/A#N/A
152023-12-14#N/A#N/A#N/A
162023-12-15#N/A#N/A#N/A
172023-12-16#N/A#N/A#N/A
182023-12-17#N/A#N/A#N/A
192023-12-18#N/A#N/A#N/A
202023-12-19#N/A#N/A#N/A
212023-12-20#N/A#N/A#N/A
222023-12-21#N/A#N/A#N/A
232023-12-22#N/A#N/A#N/A
242023-12-23#N/A#N/A#N/A
252023-12-24#N/A#N/A#N/A
262023-12-25#N/A#N/A#N/A
272023-12-26#N/A#N/A#N/A
282023-12-27#N/A#N/A#N/A
292023-12-28#N/A#N/A#N/A
302023-12-29#N/A#N/A#N/A
312023-12-30#N/A#N/A#N/A
322023-12-31#N/A#N/A#N/A
33
34178.5
Sheet5
Cell Formulas
RangeFormula
C2:C32,E2:E32E2=1*TEXTAFTER(D2,"x")
F3:F32F3=NA()
C34,E34C34=SUM(IFERROR(C2:C32,0))
 
Upvote 0
do you know why its rounding the number up? I used those formulas?
1710198745797.png
 
Upvote 0
I can't tell because you posted a picture. But, I can reasonably guess you have the cells formatted as number with zero decimal. Or you're converting the number to text using text with no decimal. Try formatting both of those columns to general and see what happens.
 
Upvote 0
THANK YOU.
Hopefully last issue. cell is MTx8 I want to count the hours (8) after all cells that start with MTx ive tried the above formula to count after the x but if comes with a SPILL error
 
Upvote 0
Why not get rid of all those error values? It would make your sheet look a lot better & makes the 'sum' cell formulas simpler.
Also, you can do this with only formulas in the top cells rather than copying each one down the column.

Guessing a bit about what formulas are where, but something like this.

24 03 12.xlsm
BCDEF
1RosteredTotal HoursActualTotal HoursAdditional Hours
28x8.58.58x8.58.50
38x8.58.5
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34178.50
Hopey87
Cell Formulas
RangeFormula
C2:C32,E2:E32C2=IFNA(1*TEXTAFTER(B2:B32,"x"),"")
F2:F32F2=IF(E2:E32="","",E2:E32-C2)
C34,E34:F34C34=SUM(C2:C32)
Dynamic array formulas.



Hopefully last issue. cell is MTx8 I want to count the hours (8) after all cells that start with MTx ive tried the above formula to count after the x but if comes with a SPILL error
I don't see any data like that in your samples above. Could we have a small set of sample data and the expected results with XL2BB so we can see the layout and easily copy for testing without having to manually type data?
 
Upvote 0
THANK YOU.
Hopefully last issue. cell is MTx8 I want to count the hours (8) after all cells that start with MTx ive tried the above formula to count after the x but if comes with a SPILL error
what is the formula you had? Do you want the value to be in a number of hours (a number format)? Or Elapsed hours (a time format)?
Please post a mini of your worksheet using the xl2bb add in (link below) (or post a table that can be copied and the formulas that you have).
 
Upvote 0

Forum statistics

Threads
1,215,155
Messages
6,123,332
Members
449,098
Latest member
thnirmitha

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