VBA Formula Is Blank (Formula Too Long?)

larinda4

Board Regular
Joined
Nov 15, 2021
Messages
73
Office Version
  1. 365
Platform
  1. Windows
Whenever I run the code only these two formulas are coming in blank. I'm not sure what I'm doing wrong? Is it because the formula's too long?

VBA Code:
Range("R2").Select
    ActiveCell.Formula = _
    "=($B$" & SalesTaxRow & "*B" & TCFirstRow & ")+($C$" & SalesTaxRow & "*C" & TCFirstRow & ")+($D$" & SalesTaxRow & "*D" & TCFirstRow & ")+($E$" & SalesTaxRow & "*E" & TCFirstRow & ")+($F$" & SalesTaxRow & "*F" & TCFirstRow & ")+($G$" & SalesTaxRow & "*G" & TCFirstRow & ")+($H$" & SalesTaxRow & "*H" & TCFirstRow & ")+($I$" & SalesTaxRow & "*I" & TCFirstRow & ")+($J$" & SalesTaxRow & "*J" & TCFirstRow & ")+($K$" & SalesTaxRow & "*K" & TCFirstRow & ")+($L$" & SalesTaxRow & "*L" & TCFirstRow & ")+($M$" & SalesTaxRow & "*M" & TCFirstRow & ")+($N$" & SalesTaxRow & "*N" & TCFirstRow & ")"
Range("S2").Select
    ActiveCell.Formula = _
    "=($Y$2*B" & TCFirstRow & ")+($Y$3*C" & TCFirstRow & ")"
 

Attachments

  • Capture2.PNG
    Capture2.PNG
    29.6 KB · Views: 3

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,215,129
Messages
6,123,217
Members
449,091
Latest member
jeremy_bp001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top