Hi I need to insert in cell some IF Function, like this:
=IF(AND($F$3>K5;$F$3<K6);M5;0)
how I can do it?
This is not working:
![]()
Cells(5, i * 6 + 2) = "=IF(AND($F$3>K5;$F$3<K6);M5;0)"
Hi I need to insert in cell some IF Function, like this:
=IF(AND($F$3>K5;$F$3<K6);M5;0)
how I can do it?
This is not working:
![]()
Cells(5, i * 6 + 2) = "=IF(AND($F$3>K5;$F$3<K6);M5;0)"
Last edited by DonkeyOte; 11-10-2010 at 11:12 AM. Reason: added CODE tags
VBA is generally US-centric - as a result you would use US based delimiters, eg:
Obviously this can be confusing if you're unfamiliar with the requisite syntax so MS also make available the FormulaLocal property![]()
Cells(5,i * 6 + 2) = "=IF(AND($F$3>K5,$F$3<K6),M5,0)"
this way you can use your own native syntax![]()
Cells(5,i * 6 + 2).FormulaLocal = "=IF(AND($F$3>K5;$F$3<K6);M5;0)"
On an aside please always encase Code within CODE tags - even one liners.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks