To sum cells that aren’t next to each other, type =SUM( then hold Ctrl and click each cell — Excel inserts the commas for you — and close the bracket. The result is =SUM(A1,A5,B3,C7). You can mix single cells and ranges in the same formula: =SUM(A1:A5,C1,E3:E9). SUM accepts up to 255 separate arguments. If you only need the total once rather than in a cell, Ctrl-click the cells and read the Sum in the status bar at the bottom of the window.
If you want to count random cells in Excel, you can simply use the SUM function and then select all those random cells with your mouse. In this way, the sum function takes all the cells that you choose one by one and when you hit enter it returns the sum of the values from those cells.

You can use the following steps to sum random cells:
- Select the cell where you want to get the sum from all the random cells.
- After that, enter the SUM function in that cell.
- From here, press and hold the Ctrl key and select each random cell one by one for which you want to calculate the sum.
- In the end, enter the closing parentheses and hit enter to the sum.
When you select each cell by pressing the Ctrl key, Excel automatically adds a comma between each cell reference, so you don’t need to add it manually.
Written by
Puneet Gogia
Microsoft MVP — Excel · Founder, Excel Champs
Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.