How to run an event upon changing the value of a specific cell?

I want to run an event or a mcaro only when a certain cell is changed.
i.e., if the cell A1 value is changed, then do such and such  ... 
0
Utf
2/23/2010 7:37:01 AM
excel.worksheet.functions 4936 articles. 2 followers. Follow

1 Replies
1124 Views

Similar Articles

[PageSpeed] 11

Right click on your sheet tab, view code. Paste this in and modify to suit:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub

'Do something here

End Sub
-- 
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Wael Fathy" wrote:

> I want to run an event or a mcaro only when a certain cell is changed.
> i.e., if the cell A1 value is changed, then do such and such  ... 
0
Utf
2/23/2010 2:04:01 PM
Reply:

Similar Artilces:

Change database source for pivot table
Hi I've built a pivot table based on an Oracle database. however I want to change the source database (from test to live) but can't figure out how to change the source database. Any ideas? Cheers Neil Just answered my own question, in the query go into table definition and change the database "Neil" <neil@funkcity.demon.co.uk> wrote in message news:%23yauyKKpFHA.620@TK2MSFTNGP15.phx.gbl... > Hi > > I've built a pivot table based on an Oracle database. > > however I want to change the source database (from test to live) but can't > figu...

Set Textbox value by selecting item from combobox but it must be editable
Hi, >I have one projrct in MS Access. >I have one form in which there is one Combobx(PalletNo_combo) and one Textbox(ShippedQuantity). >Now when I select an item from Combobox then it will automatically set the value of Textbox. >For that I am using code in control source properties of Textbox =(DLookUp("val([QTYONHAND])","PRODUCTION","PalletNo=[Forms]! [ShippingEntry]![PalletNo_Combo]")) >Uptil here its fine. >But after that, in some scenario,I have to change the value of that Textbox. >But when I click on the Textbox and enter something ...

Conditional Format Changes
Is there any way to use 'Find/Replace' to change conditional formats? -- Bill @ UAMS No. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "BillCPA" <Bill @ UAMS> wrote in message news:5453820C-4368-4C1B-A016-5218E76A10AF@microsoft.com... > Is there any way to use 'Find/Replace' to change conditional > formats? > > -- > Bill @ UAMS ...

credentials to run this report are not stored
Hi all, I'm getting this problem when I try and create a timed subscription. Error: ...credentials to run this report are not stored..... ok I created another folder under the same folder where I'm having this problem. loaded the report and I have no problem. I even moved the current folder with that report in it. Creted another folder with the same name and still the same problem with that named folder. With a different name for the folder I have no problem??? I'm stuck here.. almost all post just talk about storing the credentials, Already done and works...

Event ID:7200
Background thread FDoQuotaCheck halted due to error code 0xfac. If anyone can give me some detail about this error message it will be greatly appreciated. Thanks, Travis 0xfac resolves to DS_E_BUSY. Likely what is happening is that the particular operation is hanging trying to contact the directory (either 5.5 DS or 2000 AD). Rather than end up in a hard hang situation, the code is written to handle this and halt the function but not bring down Exchange. Likely a name resolution or network congestion which caused the store to fail to contact the directory. -- Cheers, Steve Antonio Mic...

[Outlook 2010] IMAP: change corresponding pst file
Hello, I'm using Outlook 2010 with an IMAP account at 1&1 in germany. When I set up the profile in Outlook, this account was connected with a pst file myemailaddress.pst Due to unknown reasons this account is now connected to myemailaddress(3).pst I also can' send any emails from this account. The error message is: "Error (0x8004010F) .....: Can't access the outlook data file." How can I point the profile to the original pst file? -- Ciao , Frank. When you use IMAP, outlook creates the pst for the imap account and you can't change it. If the chang...

Need only one DLL instance to run...
Hi all, 1: if two apps load the same DLL - LoadLibrary(...) - system will create to different instance of the DLL... Now, in my DLL i've a CList and i need it to be visible to all instance and all apps!!!! Is there a way!? 2: I need the dll to remain loaded till machine reboot!!! Is it possible!? Thanks Ale >if two apps load the same DLL - LoadLibrary(...) - system will create to >different instance of the DLL... >Now, in my DLL i've a CList and i need it to be visible to all instance and >all apps!!!! > >Is there a way!? It'll be difficult to share a ...

change printing preference to portrait permanently
All my emails are printing landscape. How do I change for all my emails to print portrait permanently. Deb;144414 Wrote: > All my emails are printing landscape. How do I change for all my emails > to > print portrait permanently. what is the default for the printer? -- Slipstick 'Outlook & Exchange Solutions Center' (http://www.slipstick.com) 'Outlook Tips' (http://www.outlook-tips.net/) -- http://forums.slipstick.com Look in your printer settings? Not an Outlook issue. "Deb" <Deb@discussions.microsoft.com> wrote...

can my programm change it's hardcoded data structures?
Hi! Can I somehow change the values of some hardcoded data structures so the next time my programm runs it will have the new values? For example I have a table of strings where I hold the values of a CEdit. Say the user wants to change some values [properties], can my program show the new values next time it starts? Maybe this has something to do with resources? Can you give me some ideas? >Hi! Can I somehow change the values of some hardcoded data structures >so the next time my programm runs it will have the new values? They wouldn't be hard coded if you could. :) >For >e...

Security, automation events and add-ons
Hi, Visio 2003/XP Pro SP2 I'm using the automation in the timeline so I can slide the milestones back and forth and the dates change automatically. But, I have this problem on two computers where if I lower my security to high and disable 'enable automation events' in options > security, when I start Visio, it tries to run/install all the add-ins I have, which is about 30 (and I don't know where they all came from; only a few) - everytime I start Visio. This is no good. If I increase the security to high, then the automation doesn't work. Does anyone know how I can...

run time error 10-22-03
I am having a lot of trouble when I open up word I get run time error 52 in VB. I have tried uninstalling word and reinstalling it. WE have tried deleting the macro but still to no avail can someone help me please? ...

Repost: Error running Report in an Access 2003 db from Access 2007
Ok, clarification - ignore the code from my original post, some of the reports do work. The ones that don't are reports that I have being filtered. Here is the code from one of those buttons: Private Sub Ok_Click() On Error GoTo Ok_Click_Err 'using the customer sub form for customer state report to filter the report, clicking ok will open report for selected state Dim stDocName As String Dim stLinkCriteria As String If Not IsNull(Me.Search_Results) Then stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"...

Circular Reference will not solve #VALUE! or #DIV/0!
The following will not solve (or start to solve?): H4=I4+J4+K4 I4=60.73 J4=constant/(constant*M4) L4=(I4+constant)/2 M4=function(L4) I get this error on cells H4, J4, L4, and M4: #VALUE! Sometimes J4 gets a #DIV/0! error. I know this converges, as other programs using these formulae will converge. Does excel assume 0 for inital guess? -this would explain the #DIV/0 error. Is it posible to assign an initial guess for the cells in question? Iteration is enabled with 100 maximum iterations, and 0.1 maximum change. I appreciate any help on this! Peter J4 will return a #DIV/0 error if M...

Automatically run macro
My name is Mike and i have a question about microsoft excel macro's. Attached is a copy of the excel sheet im working on. Below the excel sheet is the macro I built. Some of the cells contain given values and some cells are calculated from formulas. Cell (G4) is my given value...it is related to cell (C32). The point is, I plug a value into cell (C10) and it runs through the rest of the calcs in the other cells and gives me a value to cell (C32). I built a macro that works as a goal seek pretty much. The macro makes cell (C32) equal to cell (G4) and gives me the value for cell (C10). I wan...

display changing label caption on form as sub runs w/o screen flic
let's say i have this routine Sub Test label1.caption = "Starting ... " 'do events label1.caption = "Getting there ... " 'do events label1.caption = "Finished! ... " End Sub on my form, i have label1 right in the middle what happens is sometimes the message will change, and then sometimes it wont, or it will show the first one, skip the second and jump to the third etc etc etc so it is inconsistent. is there a way to make sure the label caption displays consistently, on time, wh...

charting in-between values
i like to chart in-between values of a given chart. e.g. a chart has two given points on the x and y-axis:1,1 and 3,3. Now i like to have the y-value when i add an extra x- value e.g. 2. Can excel do this for me? On Thu, 16 Oct 2003 11:23:55 -0700, jan <j.krabben@wanadoo.nl> wrote: > i like to chart in-between values of a given chart. > e.g. > a chart has two given points on the x and y-axis:1,1 and > 3,3. Now i like to have the y-value when i add an extra x- > value e.g. 2. Can excel do this for me? I suspect you may have just posted a very similar question under an =...

Excel Continuous Running Total
I posted a message earlier and have received a partial solution. I want to keep track of how much stock prices go up or down with a running total of how much they go up or down over several days until the direction changes. For example, if price go up 10 on Mon, 20 on Tues, 30 on Thurs and down 10 on Fri I want my running total column to show a positive number of 60 and then a red number of 10 and continue adding the amount of the total of the down days until the market shows an up day. The formula I am now using total the first and second day but does not do a running total count if t...

macro which finds last cell in a column
please help me by telling a macro which finds last cell in a column thank -- Message posted from http://www.ExcelForum.com Dim LastRow as Long LastRow = Range("A65536").End(xlUp).Row or if you just want to select it: Range("A65536").End(xlUp).Select Regards Trevor "vikram >" <<vikram.15hp0w@excelforum-nospam.com> wrote in message news:vikram.15hp0w@excelforum-nospam.com... > please help me by telling a macro which finds last cell in a column > > thanks > > > --- > Message posted from http://www.ExcelForum.com/ > ...

Money 2002 will not run
I had been using Money 2002 for approx. 3 yrs on my home pc (Dell Dim 2100, XP Home Ed. w/SP2). Last year, it simply would not launch. No error message, no splash screen, no app opening, no process listed in Task Manager. Just.... nothing.... The only change that was made to the system since M2k2 last ran was upgrading my a/v solution from Trend Micro PC-Cillin to TM Internet Security. I have tried disabling every aspect of the Internet Security product, as well as completely un-installing the app, and then attempting to run Money, but the same thing (nothing) happens. I was considerin...

HOW TO: Plot a Team Name on a chart based on two values
Hi, I have the following table exmaple, what I like to do is to plot the team as where their values cross, e.g. for TEAM 01 where 5 and 60 cross on a graph having Revenue as the Y axis and Clients as the X axis. COLUMN A COLUMN B COLUMN C TEAMS CLIENTS REVENUE TEAM 01 5 60 TEAM 02 10 120 TEAM 03 15 180 TEAM 04 6 72 TEAM 05 12 144 TEAM 06 18 216 TEAM 07 7 84 TEAM 08 14 168 TEAM 09 21 252 TEAM 10 8 96 Any guidence, much appriciated. I've done this using Ron Bovey's XY Chart Labeler www.appspro.com "Kevin McCartney" <KevinMcCartney@discussions.microsoft.com> wrot...

Re: Workflow just wont run automatically, i have to run them manually
Yes, but i realized what i was doing wrong. I assumed [bad idea] that if i create a case and hit Save & Close the first time, taht the rule will run. In order for the rule to run automatically, it has to be Save, once it saves it, then Save & Close. Thanks for your reply. "Hi, Did you check the workflow monitor to see if the rules get triggered correctly and complete sucessfully ? Have a nice day, St=E9phane Dorrekens " --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://...

Change paper size w/ WinXP
I recently updated to Win XP. In Excel 2000, I just noticed that when I do page setup, the paper size can't be selected. It is grayed out. I'd still guess that printer driver. Don wrote: > > I recently updated to Win XP. In Excel 2000, I just > noticed that when I do page setup, the paper size can't be > selected. It is grayed out. -- Dave Peterson ec35720@msn.com ...

Excel pictured hyperlink as "normal" cell content
Hi, In an Excel sheet the cells in a column contain hyperlinks(http:/ ....)covered by a picture, but they seem to be empty. The reference popups only, when I point to each cell with the cursor. How can I convert multiple cells' hyperlinks contents as a "simple hyperlink text, by few step? (the cell will contain the hl as genera underscored(text) only, instead of picture or "blank" cell) Thanks S.Yours bendes P.S. As you see, I am not an expert.. Attachment filename: hyperlink_example.xls Download attachment: http://www.excelforum.com/attachment.p...

Outlook Still Running
I am running XP Pro with Office 2003 Pro and sometimes when I exit out of Outlook, Outlook.exe and Winword.exe stay as processes still running. Does anyone else have this problem and what can do to make sure this does not happen? Thanks for your help -- Neil Remove ABCD from Email address to reply <neil154ABCD@earthlink.net> wrote: > I am running XP Pro with Office 2003 Pro and sometimes when I exit > out of Outlook, Outlook.exe and Winword.exe stay as processes still > running. Does anyone else have this problem and what can do to make > sure this does not happ...

Change positive number to negative number
Hi, I've searched this board and have tried a few things, no luck yet. I have about 100 rows, in columns A and B there is descriptive text. In column C it is either blank or it contains the text "CR". In column D there is a value (number with 2 decimal places). Column E is blank and available to use for the formula. If there is "CR" in column C, then the value in Column D must be displayed as a negative number. If "CR" doesn't exist then the number should be left positive. How can I do this? I've been working with the ABS and I...