FrenchCelt
Board Regular
- Joined
- May 22, 2018
- Messages
- 214
- Office Version
- 365
- Platform
- Windows
Hello,
I'm trying to do two formulas on a spreadsheet, both of which involve a fixed cell location (B8) and a variable cell location (depending on how many rows are generated each time). The first formula is a simple sum of all the columns from C onward for that row that I want to copy down to a specific point. Using filldown takes it all the way to the bottom, which I don't want:
I need the formula to stop at the cell in Column B next to the cell in Column A labeled "Total Unapproved Indirect Labor".
The second formula will then go in Column B next to the row labeled "% INDIRECT LESS BREAKS" in Column A and divide the value in the cell immediately above by the value in B8, multiplied by 100.
I've tried to use variations of offset in my code, but either get syntax errors or, in one case, a divide by 0 error. Can anyone offer any suggestions?
I'm trying to do two formulas on a spreadsheet, both of which involve a fixed cell location (B8) and a variable cell location (depending on how many rows are generated each time). The first formula is a simple sum of all the columns from C onward for that row that I want to copy down to a specific point. Using filldown takes it all the way to the bottom, which I don't want:
Code:
Range("B8").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[1]:RC[76])"
Range("B8", "B" & Cells(Rows.Count, 1).End(xlUp).Row).FillDown
I need the formula to stop at the cell in Column B next to the cell in Column A labeled "Total Unapproved Indirect Labor".
The second formula will then go in Column B next to the row labeled "% INDIRECT LESS BREAKS" in Column A and divide the value in the cell immediately above by the value in B8, multiplied by 100.
I've tried to use variations of offset in my code, but either get syntax errors or, in one case, a divide by 0 error. Can anyone offer any suggestions?
Last edited: