Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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
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
ActiveCell [email protected] Excel Programming 2 August 9th 06 01:42 PM
Name the ActiveCell Vikxcel Excel Programming 1 October 19th 05 01:37 AM
activecell slikity Excel Programming 7 December 13th 04 11:59 AM
Activecell value Shamsul Islam Excel Programming 5 April 30th 04 10:10 PM


All times are GMT +1. The time now is 04:05 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"