我正在使用exel 2016并开始我的第一个vba脚本。我有一个excel文档,在B列的每一行中都有不同字符串的行。我想根据if条件填充D列。请参阅附图
如何编写一个vba宏来对D列和E列运行,并在每一行读取B列中的条目,然后对写入答案做出判断,我正在思考像这样的伪代码:
Search for string in cell in Column B for current Row I'm on
If string contains "McDonald's"
then populate cell in column D for current Row as "Lunch" and in column E as "Visit".
Move to next Row
Carry on with moving through Row's until you reach last Populated Row.
任何帮助都将不胜感激。