VBA data validation

DoctorAwe

New Member
Joined
Oct 16, 2012
Messages
14
Hi,

Cell H16 has data validation which uses one of many ranges from another sheet, as its source for a droplist, based upon entry in E16.

What I need to do is limit the input of H16 to numeric values only. At the moment a user can choose a number from the list which is good. They can also type numbers in the cell which is good. But the user could also type letters in the cell, which is bad.

How can I double up the data validation on the cell? And pop-up a stop message if the cell value is not numeric?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
if H16 has data validation from a list, how are they entering different data?

Just check to see if you can click on H16, choose data\data validation, whole number (or decimal if required)
 
Upvote 0
Sorry, I may have not explained clearly.

H16 has list data validation with the Source:

=IF(G16="A",A_,IF(G16="B",B,IF(G16="C",C_,IF(G16="D",D_,IF(G16="E",E_,IF(G16="F",F_,IF(G16="G",G_,IF(G16="H",H_,IF(G16="I",I_,IF(G16="J",J_,IF(G16="K",K_,IF(G16="L",L_,IF(G16="M",M,IF(G16="N",N,IF(G16="P",P,IF(G16="Z",Z,IF(G16="Y",Y,zero)))))))))))))))))

G16 looks up a value based upon entry in E16.
 
Upvote 0
if you only want numerical data to be entered into a cell, then I would suggest data\data validation, whole number (or decimal if required), at the point of data entry.
 
Upvote 0
Thankyou,

But the point of data entry I would like to limit already has data validation to allow from list.
 
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