We're dividing 797467 by 40 
We're looking to find how many times 40 goes into 797467.

Moving on to step 1:
40 goes into 7 0 times with a remainder of 7.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 7 and we're left with 7.
Append the next digit (9) from the dividend to 7 and continue with: 79 / 40

Step 2:
When dividing 79 by 40, we get 1 with a remainder of 39.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we subtract 40 from 79, we get 39.
Grab the next digit (7) from the dividend, add it to 39, then carry on: 397 / 40

Advancing to step 3:
If we divide 397 by 40, we get 9 and a remainder of 37.
Record the quotient 9 as the next digit in the result. 
Result so far: 19.0
Deduct 360 from 397 and we're left with 37.
Grab the next digit (4) from the dividend, add it to 37, then carry on: 374 / 40

On to step 4:
When dividing 374 by 40, we get 9 with a remainder of 14.
The next digit of our result is 9. 
Result so far: 199.0
The remainder is 14 after subtracting 360 from 374.
Grab the next digit (6) from the dividend, add it to 14, then carry on: 146 / 40

Step 5:
40 goes into 146 3 times with a remainder of 26.
The next digit of our result is 3. 
Result so far: 1993.0
Deduct 120 from 146 and we're left with 26.
Append the next digit (7) from the dividend to 26 and continue with: 267 / 40

Moving on to step 6:
40 goes into 267 6 times with a remainder of 27.
The number 6 becomes the next digit in our result. 
Result so far: 19936.0
The remainder is 27 after subtracting 240 from 267.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Step 7:
40 goes into 270 6 times with a remainder of 30.
The number 6 becomes the next digit in our result. 
Result so far: 19936.6
The remainder is 30 after subtracting 240 from 270.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 19936.67
If we take 280 away from 300, we end up with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Going ahead to step 9:
If we divide 200 by 40, we get 5 and a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 19936.675
The remainder is 0 after subtracting 200 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 10:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 19936.675
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 11:
When dividing 0 by 40, we get 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 19936.675
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

In conclusion, the division gives 19936.675 with a balance of 0.0.