Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi, I am trying to make a macro perform a function if a cell in the same line
meets a desired value. not sure if on the right track, the following is an attempt. thanks. Dim J6 As String Dim K3 As String Dim M4 As String J6 = Range("J6") K3 = Range("K3") M4 = Range("M4") Dim iSect As Range iSect = Application.Intersect(Range(Target.Address), M4) 'not working: type mismatch? 'iSect = Application.Intersect(Range(Target.Address), "A1:B1") 'orig example If iSect Is Nothing Then Exit Sub End If If Target.Value = "2" Then If Not Intersect(Me.Range(J6), .Cells) Is Nothing Then With Me.Cells(.Row, K3).Select End With End If End If End If 'J6 has CN:CN, or: =SUBSTITUTE(SUBSTITUTE(CELL("address",$CN6),"$","" ),ROW(),"")&":"&SUBSTITUTE(SUBSTITUTE(CELL("addres s",$CN6),"$",""),ROW(),"") 'K3 has CW:CW, or: =SUBSTITUTE(SUBSTITUTE(CELL("address",$CW3),"$","" ),ROW(),"")&":"&SUBSTITUTE(SUBSTITUTE(CELL("addres s",$CW3),"$",""),ROW(),"") 'M4 has D:D, or: =SUBSTITUTE(SUBSTITUTE(CELL("address",$D4),"$","") ,ROW(),"")&":"&SUBSTITUTE(SUBSTITUTE(CELL("address ",$D4),"$",""),ROW(),"") |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions |