LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Activecell Reference in Macro

Using the Macro Recorder my "Mod(Subtotal, Line below hardcoded
$A$5:$A5
I need to change this line to reflect what I've determined to be the
cell
In my line 4 which is R.Cells(1).Select

Can someone assist?
Tks in Advance
Jim May


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/9/2006 by Jim May
'
Dim R As Range
Set R = ActiveSheet.AutoFilter.Range
Set R = R.Offset(1, 0).Resize(R.Rows.Count - 1)
R.Cells(1).Select
R.FormatConditions.Delete
R.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(SUBTOTAL(3,$A$5:$A5),2)=1"
R.FormatConditions(1).Interior.ColorIndex = 15
End Sub

 
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
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
Application.Goto Reference:="ActiveCell.Value"??? Whats wrong?? [email protected] Excel Programming 13 July 12th 06 11:47 AM
Looping a macro x times(x being activecell.value)? [email protected] Excel Programming 4 July 7th 06 08:08 AM
chart MAcro to change on activecell flow23 Excel Discussion (Misc queries) 0 December 7th 05 04:46 PM
using variable inside activeCell reference call dabith[_7_] Excel Programming 2 June 19th 04 08:02 PM


All times are GMT +1. The time now is 07:06 AM.

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

About Us

"It's about Microsoft Excel"