I have a spreadsheet (macro enabled) that has several different locations on the sheet that I would like to evaluate (list box) for a Yes or No selection. If the selection is Yes, then the corresponding code will populate a cell along with all the other codes separated by a comma. If the list box is set to NO or no value, the code is not placed in the cell.
I have tried using nested IF statements but can only nest 7 or 8 if statements before I get an error. I have more than 8 conditions to test and at different locations on the worksheet.
I have tried several nested if statements and they do not work. Ex.
=IF(D4="Yes",B4,"" &"," & IF(D5="Yes", B5,"" &"," & IF(D6="Yes",B6,"")))
with this: if d4:d6 = Yes, the code should be 01,02,03, the logic above yields only 01
=IF(D4="Yes",B4 &"," & IF(D5="Yes", B5 & "," & IF(D6="Yes",B6,"")))
with this: if d4:d6 = Yes the code is correct. if one or all of the selections is No or blank then it does not yeild the correct result.
I have included the workbook.
Any help would be greatly appreciated.