Forum Discussion
2ndChance
Jan 15, 2021Copper Contributor
How to subtract rows?
I have looked everywhere for the answer to this extremely simple question. All cells have numeric values.
How do automatically I subtract row 23 from row 24 across ALL cells?
- ehtisham_maverickCopper Contributor
I am assuming that you have data arranged in rows. The first row is 23 and the second one is 24. Let's assume that you want to get a difference of cells (A to E) in row 23 from cells in row 24. You can use this array formula in row 25.
=(A24:E24 - A23:E23)
If you are using Excel 2019 or earlier then you might have to select all cells from A to E in row 25 and then enter this formula by pressing CTRL+SHIFT+ENTER.
I hope this helps.
With a formula:
Enter the formula =A24-A23 in A25, then fill or copy from A25 to the right as far as needed.
Without a formula, in row 24 itself:
Select row 23 and copy it.
Right-click the row number of row 24.
Select 'Paste Special...' from the context menu.
Select Subtract, then click OK.
- 2ndChanceCopper Contributor
Thank you for your time. However, neither option works. I just get #value! errors or it enters the exact same number in every column on row 25. I'll just keep using the calculator the subtract those two numbers and manually enter them.
Could you attach a sample workbook?