Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create formulas with $Rn1Cn2:$Rn1Cn3 format
I need to have VBA create formulas with mixed referencing such as:
=SUM($G10:$G20) I can create =SUM($G$10:$G$20) and =SUM(G10:G20), neither of which is what I need. Thanks, Mike. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create formulas with $Rn1Cn2:$Rn1Cn3 format
Mike,
Have you tried something like ActiveCell.FormulaR1C1 = "=SUM(R[10]C7:R[20]C7)" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Michael D. Ober" <[email protected] wrote in message ... I need to have VBA create formulas with mixed referencing such as: =SUM($G10:$G20) I can create =SUM($G$10:$G$20) and =SUM(G10:G20), neither of which is what I need. Thanks, Mike. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create formulas with $Rn1Cn2:$Rn1Cn3 format
Sub makeformula()
[n5].Formula = "=SUM($G10:$G20)" '[n5].Formula =[n5].value'to chg to value End Sub -- Don Guillett SalesAid Software "Michael D. Ober" <[email protected] wrote in message ... I need to have VBA create formulas with mixed referencing such as: =SUM($G10:$G20) I can create =SUM($G$10:$G$20) and =SUM(G10:G20), neither of which is what I need. Thanks, Mike. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create formulas with $Rn1Cn2:$Rn1Cn3 format
sStr = "=SUM(G10:G20)"
? application.ConvertFormula(sStr,xlA1,xlA1,xlAbsRow RelColumn) =SUM(G$10:G$20) ? application.ConvertFormula(sStr,xlA1,xlA1,xlRelRow AbsColumn) =SUM($G10:$G20) -- Regards, Tom Ogilvy Michael D. Ober <[email protected] wrote in message ... I need to have VBA create formulas with mixed referencing such as: =SUM($G10:$G20) I can create =SUM($G$10:$G$20) and =SUM(G10:G20), neither of which is what I need. Thanks, Mike. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I create formulas between worksheets? | Excel Discussion (Misc queries) | |||
CREATE AND IF FORMULAS | Excel Worksheet Functions | |||
How to create a conditional format that changes the number format | Excel Discussion (Misc queries) | |||
create if formulas | Excel Worksheet Functions | |||
create links for formulas | Excel Worksheet Functions |