Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 718
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Aling multiple sets of data by header column MarkusO Excel Discussion (Misc queries) 2 April 12th 06 07:29 PM
Variable Names in Formulas Paulo Excel Discussion (Misc queries) 2 March 29th 06 01:16 PM
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
I Need VBA Assistance for global variable question Brent E Excel Discussion (Misc queries) 1 March 1st 05 08:46 PM


All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"