Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Placing a Variable Properly
Hi, I'm trying to get the rr variable syntax to work. I tried putting it in ()
and preceding it by & and $ and I cant get it to work. Any hep would be appreciated. Tia, Dennis Sub Countif() Dim r As String Dim rr As Variant Range("L1").Select rr = Application.InputBox("Enter where to count, 11 = A, 10 = B.....") ActiveCell.FormulaR1C1 = "=COUNTIF(C[-rr)],RC[-rr])" r = Application.InputBox("Enter a Range L1 Thru ?", "L1:") Selection.AutoFill Destination:=Range(r), Type:=xlFillDefault Range("A1").Select End Sub |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Placing a Variable Properly
ActiveCell.FormulaR1C1 = "=COUNTIF(C[-" & rr &"],RC[-" & rr& "])"
HTH -- AP "Dennis" a écrit dans le message de news: ... Hi, I'm trying to get the rr variable syntax to work. I tried putting it in () and preceding it by & and $ and I cant get it to work. Any hep would be appreciated. Tia, Dennis Sub Countif() Dim r As String Dim rr As Variant Range("L1").Select rr = Application.InputBox("Enter where to count, 11 = A, 10 = B.....") ActiveCell.FormulaR1C1 = "=COUNTIF(C[-rr)],RC[-rr])" r = Application.InputBox("Enter a Range L1 Thru ?", "L1:") Selection.AutoFill Destination:=Range(r), Type:=xlFillDefault Range("A1").Select End Sub |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Placing a Variable Properly
In article , "Ardus Petus" wrote:
ActiveCell.FormulaR1C1 = "=COUNTIF(C[-" & rr &"],RC[-" & rr& "])" HTH Thanx Ardus, that's one I didn't try :) Dennis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Aling multiple sets of data by header column | Excel Discussion (Misc queries) | |||
Variable Names in Formulas | Excel Discussion (Misc queries) | |||
variable height variable width stacked bar charts | Charts and Charting in Excel | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
I Need VBA Assistance for global variable question | Excel Discussion (Misc queries) |