Formula for one Row Ok. but for range require syntax

SamDsouza

Board Regular
Joined
Apr 16, 2016
Messages
205
Hello
if my formula looks like this
Code:
With ws
.Range("CU" & curRow).Formula = "=CT" & curRow & "-CI" & curRow & "-CJ" & curRow
End With
then how can i Represent the above with below range
Code:
With ws
.Range("CU3" & ":CU" & lastRow).Formula = [COLOR=#ff0000][B]"=CT3" & ":CT" & lastRow & "-CI3" & ":-CI" & lastRow & "-CJ3" & ":-CJ" & lastRow[/B][/COLOR]

'Marked in red gave error

End With
Thanks
Samd
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Just use the formula as it would be in the first row:

Code:
Ws.Range("CU3:CU" & lastRow).Formula = "=CT3-CI3-CJ3"
 
Upvote 0
RoryA thanks for immediate response
Code:
Ws.Range("CU3:CU" & lastRow).Formula = "=CT3-CI3-CJ3"

with the above syntax you provided. Will the values be same for full range or will it update.
Will yours update CT4- CI4-CJ4
CT5-CI5-CJ5
 
Last edited:
Upvote 0
It updates just as if you did it manually. Quicker to try it... ;)
 
Upvote 0
Yes Tried : Great :)

I thought i might have to put For Next Loop for what i wanted. But you saved me from looping.
Real Amazing

Thank you so much
SamD
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,189
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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