Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF Activecell
I have a global matrix, 36 columns x 24 rows, made up of 6 €“ 12 x 12 sub
matrices. I want to write a macro that will determine which 12 x 12 RANGE contains the ACTIVECELL and then REPLACE a specific value in that sub matrix. I have tried to write nested IF statements e.g. IF(Activecell()<(€œM13€),Range(€œA1:L12€),IF (Activecell()<(€œY13€)€¦etc But each variation I make still fails with syntax or compile errors. Can anyone please help Rewop Eilsel |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF Activecell
Does Activecell usually have brackets after it?
On Oct 18, 2:15 pm, Rewop Eilsel wrote: I have a global matrix, 36 columns x 24 rows, made up of 6 - 12 x 12 sub matrices. I want to write a macro that will determine which 12 x 12 RANGE contains the ACTIVECELL and then REPLACE a specific value in that sub matrix. I have tried to write nested IF statements e.g. IF(Activecell()<("M13"),Range("A1:L12"),IF(Activec ell()<("Y13")...etc But each variation I make still fails with syntax or compile errors. Can anyone please help Rewop Eilsel |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
IF Activecell
If Not Intersect(ActiveCell, Range("Matrix1")) Is Nothing Then
MsgBox "Matrix 1" ElseIf Not Intersect(ActiveCell, Range("Matrix2")) Is Nothing Then MsgBox "Matrix 2" ElseIf Not Intersect(ActiveCell, Range("Matrix3")) Is Nothing Then MsgBox "Matrix 3" ElseIf Not Intersect(ActiveCell, Range("Matrix4")) Is Nothing Then MsgBox "Matrix 4" ElseIf Not Intersect(ActiveCell, Range("Matrix5")) Is Nothing Then MsgBox "Matrix 5" ElseIf Not Intersect(ActiveCell, Range("Matrix16")) Is Nothing Then MsgBox "Matrix 6" 'etc. End If What happens if it is in more than one? -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rewop Eilsel" wrote in message ... I have a global matrix, 36 columns x 24 rows, made up of 6 - 12 x 12 sub matrices. I want to write a macro that will determine which 12 x 12 RANGE contains the ACTIVECELL and then REPLACE a specific value in that sub matrix. I have tried to write nested IF statements e.g. IF(Activecell()<("M13"),Range("A1:L12"),IF(Activec ell()<("Y13").etc But each variation I make still fails with syntax or compile errors. Can anyone please help Rewop Eilsel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
ActiveCell | Excel Programming | |||
Name the ActiveCell | Excel Programming | |||
activecell | Excel Programming | |||
Activecell value | Excel Programming |