Hi

I am trying to create a formula on my delivery note in relation to addresses in excel where i have five colums (C-G) in my data spreadsheet where sometimes some of these fields are blank. For example if cell d2 is blank i have put in the below formula which will enter the text of cell e2, f2 or g2 (if not blank) instead, so instead of having gaps on the delivery note between text they will be pushed up a line so all of the text is together and the blank lines are underneath. This is working but what i need to add is that if the text for d2 for example has already been used on the line above (because c2 was blank) i dont want to use this on the next row as it has already been used, instead i would want the text from e2 instead.

=IF(AND(Data!D2="",Data!E2<>""),Data!E2,IF(AND(Data!D2="",Data!E2="",Data!F2<>""),Data!F2,IF(AND(Data!D2="",Data!E2="",Data!F2="",Data!G2<>""),Data!G2,IF(AND(Data!D2="",Data!E2="",Data!F2="",Data!G2=""),"",Data!D2))))

Can anyone help with this as i cant work out the final part of the formula.