=IF(AND(P32="volt",P37="volt",Q37)+SUM(Q12:Q18,Q24:Q30)
Regards
ASKER
=IF(COUNTIF(P32,"*volt*")*COUNTIF(P37,"*volt*"),Q37)+SUM(Q12:Q18,Q24:Q30)
ASKER
ASKER
Cells(35, i + 16) = Cells(34, i + 16)
If you want to keep the formula in row 35, and copy the value from it into row 34, you might use: Cells(34, i + 16).Value = Cells(35, i + 16).Value
If rows 34 and 35 have formulas and you want to keep them both, then you would just delete the statement altogether.
ASKER
Both row 35 and 34 have separate formulas different from each other that should be kept,If you can't copy a formula from one row (or column) to another, those formulas need to be hard-coded in the VBA.
ASKER
then the formula on row 35 gets replaced by the resulting value onlyPlease demonstrate the issue by uploading a working spreadsheet.
ASKER
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
TRUSTED BY
SumIF is used only when you have cell range filled with "volt" and you want the total of "volt" from other column/columns. In your case, IF AND SUM would be helpful.
Try below:
=IF(AND(P32="volt",P37="vo