Re: $$Excel-Macros$$ Code Loops indefiniely due to cell value

2015-07-27 Thread gargee28
absolutely perfect now. thanks a lot. :) :) Sent by Outlook for Android On Mon, Jul 27, 2015 at 5:27 AM -0700, "ashish koul" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Cells.Count = 1 Then If Target.Address = "$K$2"

Re: $$Excel-Macros$$ Code Loops indefiniely due to cell value

2015-07-27 Thread ashish koul
Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Cells.Count = 1 Then If Target.Address = "$K$2" Then ' ADD UR CODE HERE End If End If Application.EnableEvents = True End Sub On Mon, Jul 27, 2015 at 5:54 PM,

Re: $$Excel-Macros$$ Code Loops indefiniely due to cell value

2015-07-27 Thread gargee28
Hello, i just realized that it also runs the code when i change some other cell on the sheet e.g i use some other validation on the sheet or calculate something elsewhere , why would that happen. i want it to run the code only when cell k2 is changed to a yes or no. thanks again. Sent b

Re: $$Excel-Macros$$ Code Loops indefiniely due to cell value

2015-07-27 Thread gargee28
its perfect! thanks a lot... :) Sent by Outlook for Android On Mon, Jul 27, 2015 at 5:02 AM -0700, "ashish koul" wrote: use application.enableevents = false at the beginning and application.enableevents = true at end On Mon, Jul 27, 2015 at 5:29 PM, gargee singh wrote: > > Dear

Re: $$Excel-Macros$$ Code Loops indefiniely due to cell value

2015-07-27 Thread ashish koul
use application.enableevents = false at the beginning and application.enableevents = true at end On Mon, Jul 27, 2015 at 5:29 PM, gargee singh wrote: > > Dear Experts > > > > I wrote a code to multiply or divide a range of numbers by 1000 if > depending on whether a user selects a yes or no fr

$$Excel-Macros$$ Code Loops indefiniely due to cell value

2015-07-27 Thread gargee singh
Dear Experts I wrote a code to multiply or divide a range of numbers by 1000 if depending on whether a user selects a yes or no from a drop down in cell k2 in the active sheet. The problem is that once I select “yes” or “no” the code loops indefinitely because it finds a yes or no in the cell