If the word in the previous step matches the word in the current step BK Member Posts: 145 Threads: 85 Joined: Aug 2014 04-13-2019, 04:18 AM If the word found in the previous stage matches the word in the current cell.  I'd like to ignore the search for words in the current cell and find the mango. Is there any way? Function macro1 Code: ```out  str cell_word; int i nRows ExcelSheet es.Init; nRows=es.NumRows for i 2 nRows+1 ,es.GetCell(cell_word 2 i) ,web F"https://www.google.com/search?&q={cell_word}"``` Attached Files Image(s)     Start_Learning Member Posts: 101 Threads: 4 Joined: Nov 2015 04-14-2019, 02:57 PM Function macro21 Code: ```out str cell_word; int i nRows ExcelSheet es.Init; nRows=es.NumRows str prev_word for i 2 nRows+1 ,es.GetCell(cell_word 2 i) ,if(prev_word = cell_word) continue ,prev_word = cell_word ,web F"https://www.google.com/search?&q={cell_word}"``` BK Member Posts: 145 Threads: 85 Joined: Aug 2014 04-15-2019, 04:02 AM (This post was last modified: 04-15-2019, 02:36 PM by BK.) Thank you for your help I solved all the problems with your help. Start_Learning Member Posts: 101 Threads: 4 Joined: Nov 2015 04-15-2019, 03:58 PM This is a more generic way to avoid all duplicated word(s). Like in this scenario: Apple Apple Mango Apple Orange Apple Durian Apple Pear Function macro22 Code: ```out str cell_word; int i nRows ExcelSheet es.Init; nRows=es.NumRows str prev_word ARRAY(str) nodupe for i 2 nRows+1 ,es.GetCell(cell_word 2 i) ,if(sub.isExist(nodupe cell_word)) continue ,nodupe[] = cell_word ,web F"https://www.google.com/search?&q={cell_word}"(`) , #sub isExist function# ARRAY(str)&arr \$b int i ;out F"arr.len = {arr.len}, b = {b}" out F"{b}" for i 0 arr.len ,if (arr[i] = b) ,,ret 1 ret 0``` BK Member Posts: 145 Threads: 85 Joined: Aug 2014 04-16-2019, 01:17 AM Amazing! Perfect! Thanks to you, I'm very happy to solve the problem. « Next Oldest | Next Newest »