LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Odd macro behavior

Thanks to both of you, and a BIG "DUH!!!" to me! I normally post copied code
into the NotePad and get rid of unexpected carriage-returns -- failed to do
it this time.

Kablooey! Don't worry, folks, I'll get the hang of the VBA pretty quickly <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"merjet" wrote:

You are probably getting the compile error because this:

If .Value & .Offset(0, -1).Value & .Offset(0, -2).Value <
..Offset(1, 0).Value & .Offset(1, -1).Value & .Offset(1, -2).Value
Then

should be one line in your code. When long lines are posted,
the text wraps. So make it one line or put a continuation
character at the end of the first.

Another possible problem is your use of, for example, myCell(1,
-2).Value.
Maybe you believe this refers to the same row 2 columns left.
However, it refers to 3 columns left. If you use Offset like Vergel
did, the code is intuitively clearer.

Hth,
Merjet



 
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
weird macro behavior Dave F Excel Discussion (Misc queries) 0 November 30th 06 03:35 PM
Inconsistent Macro Behavior Sarah K Excel Discussion (Misc queries) 4 November 1st 05 10:36 PM
Inconsistent macro behavior davegb Excel Programming 2 June 21st 05 11:19 PM
Strange macro behavior! davegb Excel Programming 9 May 20th 05 10:50 PM
Macro Random Behavior Otto Moehrbach[_6_] Excel Programming 5 February 16th 04 09:55 PM


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