Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Write properly a formula in VBA excel

$
0
0

I'm struggling to write a formula in VBA excel.

This is my code:

Dim Formula as Range
Dim Number as Integer

Number = 1

Formula.formula = "=MAX(IF(LEFT(B7:B250,1)= & Number &, B7:B250))"

It gives my syntax error.

Could you help me out? Thank you.


Viewing all articles
Browse latest Browse all 88835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>