Reputation: 289
I'm trying to insert the number contained by the variable Row4Num -1 into the Active Cell, along with some text, but I can't quite figure out the syntax. Any help would be greatly appreciated-- Thanks!
Range("I7").Value = "=""Teams: & "" Row4Num - 1"
Upvotes: 3
Views: 34992
Reputation: 152450
This:
Range("I7").Value = "Teams: " & Row4Num - 1
When using VBA variables in a String they must be outside the ""
and concatenated with &. Everything inside the quotes will be treated as a text string.
Upvotes: 9