Embed presentation
Download to read offline
![=IF(AND(RC[-12]="B",RC[1]="P"),"B",IF(AND(RC[-12]="G",RC[1]="P"),"G",IF(RC[-12]="B","B1","G1")))](https://image.slidesharecdn.com/formulaexcel-201221092019/75/Formula-excel-1-2048.jpg)
This formula uses nested IF statements to return a string based on the values in two cells. It will return "B" if the cell 12 columns to the left is "B" and the cell one column to the right is "P". It will return "G" if those cells are "G" and "P" respectively. Otherwise it will return either "B1" or "G1" depending on the value 12 columns left.
![=IF(AND(RC[-12]="B",RC[1]="P"),"B",IF(AND(RC[-12]="G",RC[1]="P"),"G",IF(RC[-12]="B","B1","G1")))](https://image.slidesharecdn.com/formulaexcel-201221092019/75/Formula-excel-1-2048.jpg)