Using excel if function with data validation

 slashzed -

i am running EXCEL 2007.

i am trying to make an if statement that accomplishes something like, If c1=b1 then d1 = pick a choice from the data validation list(drop down list) that is from e1 to e5. else pick a choice from the data validation list(drop down list) that is from f1 to f5.

i am new to running macros in excel. pls advise how I need to insert a macro for a particular cell and then copy it to the other cells below it i.e for d2,d3..etc to chk for c2,c3,..etc


3 replies

Registration date
Sunday June 14, 2009
Last seen
August 7, 2021
am not sure whether I have understood your question correctly
according to me no need of a macro

you have validation in the cells E1 to E5 and also F1 to F5

type the following formula in D1
if there is not entry in E1 or F1 (that is if you have not used the validation) then D1 will be zero
once you choose a validation is used to enter a value in E1 or F1 then D1 will change accordingly. try some experiments

copyp D1 down upto D5.
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month

well my requirement wasn't exactly the same as explained above but your explanation helped me fixing my own problem. Thanks a lot dude. I appreciate that!
I too need an answer for your question,,,, I have asked many no answer yet they say v cant do it, however am confident about excel there has to be a way for it
Registration date
Thursday January 28, 2010
Last seen
August 2, 2020