Hi, I am very novice in excel VBA and trying to put a code where based on values in various cells (say col A, col B, Col E) for each row, I want to use a logic and put a value in another cell say col X. High level Example
If Col A val = A, Then "1" Elseif val = B then "h" &"-"& if col B <0, then "Neg" ELSE if B=0 then "Zer" Els "Pos" &"-"& if Col E val = "Male" then "M" Else "F"
so the output in col X = 1-Zer-M
I am struggling to refer to the cells properly as I want to make a resuable code where in future I can change col A , B etc and also change the logic and resuse the code. So please advise as how to begin or if you can put a simple code then I can try to build upon that.
Thanks in advance for your help and guidance.
Regards
Sachin
If Col A val = A, Then "1" Elseif val = B then "h" &"-"& if col B <0, then "Neg" ELSE if B=0 then "Zer" Els "Pos" &"-"& if Col E val = "Male" then "M" Else "F"
so the output in col X = 1-Zer-M
I am struggling to refer to the cells properly as I want to make a resuable code where in future I can change col A , B etc and also change the logic and resuse the code. So please advise as how to begin or if you can put a simple code then I can try to build upon that.
Thanks in advance for your help and guidance.
Regards
Sachin