data validation

cybergremlin

New Member
Joined
Dec 11, 2018
Messages
22
Hi

Is it possible to link multiple data validation boxes?
What i mean is if i have a validation box in cell B1 and another in cell C1 when i update 1 the other also updates and visa versa?

thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
If you want the options for the validation to update, you just need to use an "=IF" formula on the cells containing the list of options


If you want the actual value to update... you will need to use VBA and a Value Change handler

Code:
Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Row = 1 And Target.Column = 1 Then
    'Your Code
    'cells(1,2)="New Value"
    
End If
End Sub
 
Upvote 0
Do you mean Data Validation List?

I'm not sure what a:
multiple data validation boxes

Are.
 
Upvote 0
So tell me more:

You have a data validation list in lets say A1 which when clicked on gives you choices to choose from

And this list of values comes from where?

Did you enter them in the data validation dialog box individually or does the list of values come from a range on your sheet.

And you have two Ranges with data validation list

Like A1 and C1

And now you want both list of values to change when. I'm now not sure what your wanting

You want the list of available choices to change?
 
Upvote 0
sorry, its probably how I'm explaining it,
I have a list in say A1:A5. dog, cat, wolf, sheep, horse.

In cell B1 i have the validation list based on A1:A5
In cell C1 i have another validation list based on the same data in A1:A5.
What i want (if possible) is when i choose either dog, cat etc in cell B1, C1 also shows the same animal but if i choose a animal in cell C1, B1 updates.

hope this makes sense
 
Upvote 0
Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Modified  12/12/2018  1:57:11 PM  EST
Application.EnableEvents = False
If Target.Column = 2 And Target.Row = 1 Then Range("C1").Value = Target.Value
If Target.Column = 3 And Target.Row = 1 Then Range("B1").Value = Target.Value
Application.EnableEvents = True
End Sub
 
Upvote 0
Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Modified  12/12/2018  1:57:11 PM  EST
Application.EnableEvents = False
If Target.Column = 2 And Target.Row = 1 Then Range("C1").Value = Target.Value
If Target.Column = 3 And Target.Row = 1 Then Range("B1").Value = Target.Value
Application.EnableEvents = True
End Sub

This is exactly what i needed, thank you
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top