Reset Value In Dependent Cell When Another Cell Is Updated

Aug 5, 2006

1. I created a "Top Category Data Dependent Validation List for sub-categories” in the attached spreadsheet. The selection from the Category drop-down list in column B, then drives or limits the choices in the Sub-category drop-down list in column C.

Credits: To achieve the above technique, I used the "Dependent List Validation" document as a technical reference.
the document is available from http://www.ozgrid.com/Excel/dependent-lists.htm

2. If the user updates the Category selection in Column B, then the value in the corresponding row in Column C should be "reset to a ( NULL/Clear) value," as to automatically prevent any human-error in forgetting to also update the Sub-category data in Column C.

(Optional Reading--the following steps are not related to steps 1 & 2 above, just notes regarding other data validation process created in this spreadsheet

3. I also created another column (D) that gets automatically populated with the Category ID,
based on the sub-category drop-down list selection in C.

4. Also in this spreadsheet, a macro checks for any "missing required data
before allowing the end-user to save this worksheet. As an example, In Column A, if there is a "RecordId" that exists in the same row, then the macro checks if the user has entered required values in Column B, C, "AND/OR" D. If the end-user did not enter any of the required values,
then an error message pops-up with this message:

"Cannot Save this file due to Missing Required Data. Please review highlighted record and complete missing data."

Credits:

Special thanks to:
-OzGrid Business Applications for writing code for a UDF (function that returns last word) that I used/modified a little bit to achieve Step 3.

-Carl (member name" carlmack") for his help in the methods I used in Step 4 above.

View 9 Replies


ADVERTISEMENT

Reset Dependent Drop Down List

May 10, 2007

The only thread I could find on this topic was not resolved. I want to reset the value of a dependent drop down list (in H3) to the first valid choice when F3 is changed.

I have the following code that initially worked but no longer does.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Goto errHandler
Dim DLRng As Range

If Not Intersect(Target, Me.Range("F3")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
Set DLRng = ActiveWorkbook.Names(Target.Value).RefersToRange
Me.Range("H3").Value = DLRng.Offset(0, 0).Value
End If

exitHandler:
Application.EnableEvents = True
Exit Sub

errHandler:
MsgBox "Could not change dependent cell"
Goto exitHandler
End Sub

I now get the error message ""Could not change dependent cell" every time I pick a different item in the drop down list in cell F3. If I remove the error handler I don't get the error and the code simply doesn't work.

View 9 Replies View Related

Copy / Paste From Cell In One Sheet To A Cell In Another Dependent On Selection Of Dropdown Menu

May 31, 2012

I have a workbook with two sheets. The idea behind the workbook is an Interview Guide to be used just before an Interview. For now my problem is this.

Sheet 2 "Competencies" is just data. It stores competencies with their associated definitions and questions.

Sheet 1 "Control Page" is the sheet where the questions will eventually go. The user (Interviewer) will input data on the first two pages which will include name of candidate, date of interview etc. but they will also select 5 Competencies from the already existing drop down menus on page two. From there as the selections are made I wish for a code to copy the corresponding definition on sheet 'Competencies" to cells lower down in sheet "Control page".

I don't see a place to upload a file as I have a sample of the sheet ready to go.

View 2 Replies View Related

Disable/enable A Cell Based On A Condition Which Is Dependent On Other Cell Data

Jan 26, 2007

how can we disable/enable a cell based on a condition which is dependent on other cell data

View 4 Replies View Related

Setup Dependent Cell Based On Contents Of Independent Cell

Oct 20, 2013

I'm trying to set up a dependent cell (B) based on what is in the independent cell (A)

If A is blank, B should be blank

If A has any value other than X, B should display a set string Y

If A contains X, B should contain a drop down list with a range of choices.

I've tried setting it up as a dependent validation cell and I've tried using OFFSET, but the best I can do is to get three different drop down lists to populate cell B. One with only string Y, one with only a blank, and one with the range of choices. The problem is in the first two cases above, I want the cell to fill automatically with either blank or string Y -- I don't want them to just be drop down options, with the cell displaying the last value that was input.

View 2 Replies View Related

When Cell Updated Another Cell To Be Changed

Jul 10, 2007

I have a Schedule Grid that I've created. When a cell gets updated, I'd like for another cell to be changed (as to trigger some conditional formats that I have going on). I figured it'd be rather easy, and it was... sort of.

This is the code that I am using:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column < 4 Or Target.Column > 10 Then Exit Sub
If Target.Row < 4 Or Target.Row > 422 Then Exit Sub

Target.Offset(0, 9).Value = 1

End Sub
The code worked perfectly, up until a random moment. Not sure why, but now, the code only works when the cell is updated by a manual entry or deletion. If I use a validation list (which is the primary form of entry), it runs every line of code EXCEPT the Target.Offset(0,9).Value=1.

Here's the strange part. I took it home, and it works fine there. It used to work fine on my computer at work, now it doesn't. Nor does it work on the computer that I need to present this on tomorrow.

I've tried entering in a MsgBox() event both before and after the Target.Offset line. The first message box appears, so I know the code is passing through the restriction lines. But the second message box is not appearing. The code for whatever reason exits the sub at the Target.Offset.

View 9 Replies View Related

Subtracting Updated Value In Cell

Sep 25, 2013

If in Cell A2 I have a function that updates it's number value automtically (i.e. From 5 to 7) and in cell B2 I have a value I wanted subtracted to the value Cell A2 updated by. Is this task possible?

In the I.e example, cell A2 had an updated value by 2, will it be possible to subtract that value in Cell B2 and continue doing so if Cell A2 kept updating?

View 4 Replies View Related

How Can I Keep A Cell Constantly Updated

Aug 13, 2008

I need to keep a cell (or sheet) updated second by second. is there a way to do this?

View 9 Replies View Related

Cell Not Updated As Should Be By Code

Dec 22, 2006

I have code which when run thru manually in VBA says it has updated the contents of the cell in a sheet. Indeed the code all reacts as if it has updated the cell in memory, however the actual spreadsheet cell has not been updated. This has happened in the past and then magically starts working wthout change.

View 6 Replies View Related

Show Who Last Updated Cell On Spreadsheet?

Dec 6, 2013

Is it possible to set something up on a spreadsheet which shows who last updated a cell and when they did it? I have a huge spreadhseet with lots of data on which gets updated by a number of users, they update a lot of different cells and this leads to errors being made with the data in the spreadsheet.

is a way I can show who updated a cell and what date - is this doable?

View 5 Replies View Related

Automatically Populate Another Cell When One Is Updated?

Apr 27, 2014

I have a spreadsheet where vehicle milage is entered at the end of each month. On another sheet I have the vehicle fleet numbers and the the months along the top. What I need to happen is; when the mileage cell is updated I need the cell in the other sheet to be automatically populated, when the mileage is updated the next month I need the next cell(February)to be populated with the new milage and so on. The aim is to calculate monthly milage for each vehicle without having to enter the date at the beginning and end of the month.

Everyone I work with is completely computer illiterate and only knows how to enter the data the same way they always have(just the once at the end of the month) changing it up will only cause issues.

View 1 Replies View Related

Cell Updated Whenever A Change Occurs

Aug 22, 2009

i want to link my stock portfolio to a spreadsheet to make various calculations on historic performance.
my problem is that it is the same cell thats get updated whenever a change occurs, so that there is no history.

let's say i put the DDE-link in cell A1, i would like B1 to be filled with that value
and then when the value changes i would like B2 to be filled with the new value
and the next time B3, and so on.

View 10 Replies View Related

Cell Contents Dependent On Active Cell?

Nov 9, 2012

I have a list of items in cells b2 to z2. I want to display the contents of those cells in b2 dependent on what the active cell is. For example if the active cell is in column b I want a2 to show b2. If the active cell is in column C I want A2 to show C2, etc.

View 3 Replies View Related

Reset Cell Value To Zero

May 28, 2009

i have cells A1 to A10 filled with numbers
i have cells B1 to B10 blank
what i need to do is when something is typed in cell B1 - A1 to A5 are reset to zero and when i type something in cell B2 - A2 to A6 reset to zero.

I have tried to do this as a range ie

A1- A10 have numbers in B1 - B10 copy these numbers and reset if anything is typed in C1 with this formula =IF(C1:C5="",A1,"0") what it should do is reset B1 to zero if anything is typed in C1-C5 but only when something is typed in C1 does this work ..

View 9 Replies View Related

Reset Last Used Cell Without Saving

Nov 14, 2008

if there is a way to reset the last used cell without saving? I have macro first brings in about 30,000 rows of data, but deletes most of it before it finishes running. This works fine, until the third time I try to refresh the report, when Excel won't let me insert another 30,000 rows of data because it would push the last used cell off the bottom of the report and that's apparently not okay, even if the cell is completely blank.

I have it set to automatically clear the blank rows and save when the report opens, but that doesn't help if they run it too often before that happens. I don't want to do a background save because they may have made changes that they don't want to save.

View 9 Replies View Related

Formula In Cell Becomes Ineffective When Other Cells Updated From Userform

Apr 30, 2014

Contents formula =countif(B1:D1,"YES").

This works fine.

Column1 has simple formula to count if text is equal to 'YES'.

But when I double click any cell in column 1 to open userform and update values in column 2,3,4 then the formula in column1 does not work.

Sample book attached : UFM.xlsm‎

View 6 Replies View Related

Not Working-WS Change Macro When Cell Is Updated Via Formula

Sep 12, 2007

I am using the worksheet change routine for conditional formating of more than three items.

The problem is that it only changes if I manually type within the page and does not update if the cells are updated via formulas.

To explain a little more, I have three sheets that I combine into one to help find the best rate from three companies using the following formula:

=IF(AND(MIN(PMI!C4,UG!C4,GE!C4)=PMI!C4,MIN(PMI!C4,UG!C4,GE!C4)=UG!C4,MIN(PMI!C4,UG!C4,GE!C4)=GE!C4),FIXED(PMI!C4,2)&" All",IF(AND(MIN(PMI!C4,UG!C4,GE!C4)=PMI!C4,MIN(PMI!C4,UG!C4,GE!C4)=UG!C4),FIXED(PMI!C4,2)&" PMI/UG",IF(AND(MIN(PMI!C4,UG!C4,GE!C4)=PMI!C4,MIN(PMI!C4,UG!C4,GE!C4)=GE!C4),FIXED(PMI!C4,2)&" PMI/GE",IF(AND(MIN(PMI!C4,UG!C4,UG!C4)=GE!C4,MIN(PMI!C4,UG!C4,GE!C4)=GE!C4),FIXED(UG!C4,2)&" GE/UG",IF(MIN(PMI!C4,UG!C4,GE!C4)=PMI!C4,FIXED(PMI!C4,2)&" PMI",IF(MIN(PMI!C4,UG!C4,GE!C4)=UG!C4,FIXED(UG!C4,2)&" UG",IF(MIN(PMI!C4,UG!C4,GE!C4)=GE!C4,FIXED(GE!C4,2)&" GE","ERROR")))))))
Please feel free to condense this if you like.

So when I update a reference on one of the first three sheets, the cells update on this sheet but the cell colors never change. This is the code for the worksheet change

Private Sub Worksheet_Change(ByVal Target As Range)

Dim Cel1 As Range
Dim Rng1 As Range

On Error Resume Next
Set Rng1 = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 1)
On Error GoTo 0

View 9 Replies View Related

Using OnTime Schedule To Set Or Reset A Cell Value

Jul 24, 2013

I just can't seem to get the syntax correct for setting or resetting a cell value using the OnTime schedule function. It looks like the cell value changes randomly and after several cycles it just runs non-stop very, very quickly and I have to use the ESC key to break out of the loop.

Here is my code:

VB:

Sub RunOnTime()
dTime = Now + TimeValue("00:00:10")
Application.OnTime dTime, "RunOnTime"
If Cells(1, 4).Value <= Cells(6, 2).Value Then
Cells(1, 4).Value = Cells(1, 4).Value + 1

[Code]...

View 1 Replies View Related

Changing One Validation Cell Should Reset Another?

Nov 12, 2013

My sheet has a Data Validation drop down menu "Department", where the user selects a Department. Based on this selection, another Data Validation cell "Team Leader" gives a list of Team Leaders to choose from. This works perfect. Change the Department, you get a different list of names. The problem is that if I have both a Department and a Team Leader selected, and then I change the Department selection, it keeps the Team Leader cell filled with now invalid data (the Team Leader from the previous department). If I then click on the Team Leader cell, it has the correct names listed to choose from, but until I do that cell retains the old information. Is there any way to blank the "Team Leader" cell, or push data to it (I've included a Choose a Team Leader entry in my list of people), when I change my Department selection?

View 9 Replies View Related

Two Cell Accumulator Then Reset First Cells

Jan 19, 2008

I basically have four cells
c8 = goods in (new components in)
c9 = kanban stock (current qty in stores)
c10 = current stock (=kanban stock minus allocated)
c11 = allocated (number on order)

What I would like to be able to do is enter a figure in c8. This would then start the macro to update c9,10 and 11.

The problem I have is that if i enter a figure into c8 sure it alters the others if i do a quick =sum formula but does not reset. Therefore if I put for example 6 in cell c8 and then want to add another 8 all other cells alter accordingly. I want all cells apart from c8 to update and hold the figure after c8 has been entered.

View 12 Replies View Related

Using OnTime Schedule To Set Or Reset Cell Value

Jul 23, 2013

I just can't seem to get the syntax correct for setting or resetting a cell value using the OnTime schedule function.

It looks like the cell value changes randomly and after several cycles it just runs non-stop very, very quickly and I have to use the ESC key to break out of the loop.

Here is my code:

Code:

Sub RunOnTime()
dTime = Now + TimeValue("00:00:10")
Application.OnTime dTime, "RunOnTime"
If Cells(1, 4).Value

View 5 Replies View Related

Reset Cell Value Based On Two Conditions

Mar 10, 2009

I am trying to build a spreadsheet that tallies hours worked and hours available for the next day. The key to this spreadsheet is the number 70. A worker can accumulate no more then 70 hours in an 8 day period, however after any day with no hours worked the rule resets to 70 hours available again. I have attached a sample spreadsheet so you can see how this should work.

View 9 Replies View Related

Reset Last Cell Without Saving Workbook

Jan 19, 2007

Is there a way, either in Excel or using VBA, to reset xlLastCell without having to save the workbook?

View 4 Replies View Related

Formula To Reset A Count Based On Cell Value

Feb 2, 2009

I've found a # of threads on this subject but have been unable to find the function I need.

I've got a spreadsheet (attached) to calculate vacation time, but I can't figure out how to make the used time reset on an anniversay date. For example, if Employee 1 has earned 80 hours of vacation but only used 40 by his 4 year anniversary date, how do I make unused time roll back to 80 the day of his anniversary?

Here's the structure: 2 Personal days given Jan. 1, then 2 more on July 1 to employees here at least 6 months. Those whose 6 months fall after or between are awarded 2 days on their anniversary then accrue as normal. Unused personal days are lost at the end of the year. Vacation time is 40 hours after 1 year, 80 hours at 3 yrs, then 120 hours at 5+.

View 9 Replies View Related

Move Latest Updated Cell In Sheets In A Workbook Based On Time And Date

Mar 1, 2014

I am having rows of data, that i will be updating from time to time. I want excel to move the latest updated rows, in any column if updated, to move to the top, to easiy know that i updated those records. It should be that when i updated more rows than one, then the first updated cell would be in lower, in order, than the latest updated cells. I do not want any cumbersome vba. I want in formula or in conditional formatting. The row no may be total not limited to some rows.

Because, you naturally would have updated the 200 th record and would have saved. It saved as it is, so when you next opens it it is there, but how can i know that that is the last row of data i edited.

View 5 Replies View Related

Does Cell Updated By Market Data Feed Mechanism Qualify For Change Event

Oct 27, 2012

It is my general understanding that the change event system within Excel vba is fairly particular as to what will fit the mold of a qualifying change event.

For example, changes that the user imparts to the worksheet and other written code are legitament candidates for change events. However copying down data and cells changing their values indirectly rather than directly may not be considered in the Microsoft change event design.

I would like to know 2 things:

1) Does a cell updated by a market data feed mechanism qualify for a change event?

2) Any list of qualifying change event types. It seems that Microsoft does not have this information.

View 2 Replies View Related

Sending Outlook Calendar Invites Automatically When Cell Updated In Excel Spreadsheet

Jan 7, 2014

I have created a spreadsheet that displays new dates in column D based on provided dates in Column B and recurrence intervals selected in column C. The dates in column D are when a training deadline occurs. I have been trying to get a macros written so that when a cell in column d is updated, an outlook appointment message is sent to the person doing the updating. The idea here is that anyone can use this without future coding (so their address would be placed in cell say A1)

So far all i have gotten is excel to send an email to me with the excel spreadsheet as an attachment, not really what I want. Again, I dont want somethign specific to my computer settings, I want to be able to send the spreadsheet out with simple instructions for the user to change their email in cell A1 and then every time a cell changes in column D, it automatically generate an appointment reminder for the new date.

View 1 Replies View Related

Cell-dependent Drop-down

Oct 12, 2009

Say in A1 i have either Yes or No, in B1 i have a dropdown validation from a list if A1 is Yes and "n/a" if A1 is no.

I thought if i renamed my list validation to "Yes" and labelled "n/a" as "No", then using =INDIRECT(A1) as my list validation would do the trick.

View 2 Replies View Related

Link Dependent Of A Cell?

Jan 28, 2014

In Excel it's possible to create a link dependent of a cell.

Example

='C:UsersAMDesktop[" & C9 & "]Sheet1'!$B$3

where C9=Andrew.xls

View 7 Replies View Related

Cell Value Dependent On Text Value Of Another

Apr 18, 2008

How can I get Excel 2003 to place a specific name (that is not in the spreadsheet) for cells in column A for which the cell value in column B contains a particular word?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved