If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Old Value not clearing in drop down list
Dear Members,
I have two drop down list in the Excel sheet. say Country and State. If i choose value from Country, automatically respective state should be populated. I have achieved this through creating the name manager and use that in the Data validation. Issue here is, when i select the value from country, old value in the state still shows up in the field & correct value shows in the drop down. How to clear the old value in the state field ? Can we achieve this through the excel sheet function itself without macros/scripts ? Appreciate your quick response. Ps: am using Excel 2007 |
#2
|
|||
|
|||
Quote:
I was unable to clear the value functionally (it would be rather simple to do so with a macro), however I did use Conditional Formatting to highlight that the cell's value is no longer valid. I did this using a VLOOKUP in the Conditional Formatting formula wrapped in an ISERROR to change the colour of the text if it is no longer a member of the first dropdown's "family". In this way perhaps you could colour the text white on a white background rendering it invisible and therefore the user thinks it has disappeared. Excel will still process it in formulas etc elsewhere though as it ignores colours and the value still exists. The Conditional Formatting formula I used in cell C5 was: =IF(C5"",IF(ISERROR(VLOOKUP($C5,INDIRECT($B5),1, 0)),1,0)) ...where B5 held the first dropdown value and C5 the second dropdown value NB: This forum often drops the "does not equal" signs in formula. If it isn't showing above, there is a greater-than/less-than between the first C5 and the double-quotes. Last edited by tarquinious : March 23rd, 2011 at 01:24 PM. Reason: Forum drops the symbols |
#3
|
|||
|
|||
Hey Thanks man, Great Idea. This saved my time.
|
Thread Tools | |
Display Modes | |
|
|