I am newbie in Excel Macro. I am trying to do a very simple macro for excel. The Macro will works like IF a specific cell (for example D) contains some categorized string then it will return a specific value in another cell. For an example if any cell of column D contains 'Books', 'Food', 'Fruits' string anywhere of its cell then it will return 01, 02, 03 respectively in Column E. For sure it will very easy task and probably this kind of question asked earlier but as I am newbie please let me know in a brief or any link to get the solution.
I am trying to use this code I found.
But It returns an error: Else without IF. What should I do?
Please Login or Register to view this content.
Thanks in advance.