PDA

View Full Version : Insertinf formulas using VBA



ChrisKad
08-19-2015, 07:57 AM
Hi,

I'm put this formula in VBA:

Range("K3").Formula = "=IF(G3>$K$1,$K$1,G3)"

However, the result is that whether or not G3 is greater than K1, it just puts K1 all the way which falsifies all my results.

How can I modify my formula so that it calculates correctly?

Thanks a lot :)

Paul_Hossler
08-19-2015, 08:28 AM
works as expected for me

Do you have Calculate set to Automatic?

SamT
08-19-2015, 05:28 PM
I also see nothing wrong with that formula. The only change I might try is

Range("K3").Formula = "=IF($G3>$K$1,$K$1,$G3)"

ChrisKad
09-14-2015, 04:55 AM
Hi guys. It ended up working a while ago. I have no idea how.

Thank you for your time though :)

Chris