LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Changing values in column 1 and 2 based on values in col 3 & 7

It would help to show your existing code. To avoid infinite loops when
changing the sheet from within the _change procedu

Application.EnableEvents = False
'make change to sheet
Application.EnableEvents = True

Be sure to have error-handling code to reset the application events in case
of any error: otherwise this setting will persist even when your macro has
completed.

Tim

"sonali" wrote in message
...
I am trying to create micro with requirements as below -

1. cell(2,3) gets focus and if cell(2,1) and cell(2,2) are blank, macro
should put 1 in both.
2. Cell of Any other row (2 onwards) in column 3 gets foucs, cell(row,1)
should copy value of prevois row and cell(row,2) should have incremented
value than previous row.
3. If any cell from col 7 is focuesd and cell(row,3) is bank then
cell(row,3) = cell(row-1,2) and cell(row,1) = cell(row-1,col).

I am using workbook_change event to active above mentioned logic, but is
not
working correctly as this event does not get fired while entering values
in
the cell for first time. Also sometime application is in infinite loop.
What is the correct way to implement above requirements.




 
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
Adding numerical values based on multiple values in another column Kazmaniac Excel Worksheet Functions 6 April 4th 07 08:53 PM
summing up values in a column based on values in 3 other columns Axel Excel Programming 4 March 30th 07 10:40 PM
changing values in one column based on values in another? QuickLearner[_18_] Excel Programming 1 July 10th 06 04:18 PM
Calculating values to column D with formula based on values column A spolk[_2_] Excel Programming 1 April 30th 04 06:29 PM
Create Worksheets Based Upon Changing Column Values in XP Gary[_12_] Excel Programming 1 December 18th 03 12:07 AM


All times are GMT +1. The time now is 06:50 PM.

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"