Hello pdalal,
This should work...
Sub frmlaIntrsct(Optional colRanges As String, Optional rowRanges, Optional frmlaNm As String, Optional frmlaString As String, Optional pasteAsValuesT As Boolean)
Dim rng As Range
Dim colRngArr As Variant
If Len(frmlaString) < 1 Then
frmlaString = frmlaByNm(frmlaNm)
End If
Intersect(Range(colRanges), Range(rowRanges)).Select
Selection.FormulaR1C1 = frmlaString
If pasteAsValuesT = True Then
colRngArr = Split(colRanges, ",")
For x = 0 To UBound(colRngArr)
Intersect(Range(colRngArr(x)), Range(rowRanges)).Select
Selection.Calculate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats
Next x
End If
End Sub
Bookmarks