I am making a time calculator which allows me to calculate total hours worked between 2 times and have no problem with am-am or pm-pm BUT, I cannot for the life of me work out a formula that makes Excel calculate PM-AM

for example:

ON OFF Total Hours Worked
11:00 13:30 2:30 <--- This is fine, Used formula =SUM(B2-A2)
21:30 01:30 #### <---- This is where it goes wrong


It dose not seem to want to calculate over 23:59

I have all cells set to Customs Format [hh]:mm as I have read somewhere this may help, which it has not.

Dose anyone know a FORMULA which i can use for the WHOLE thing as with my work I will be always adding past PM- AM times ect.


Thanks