fluffynicesheep
Board Regular
- Joined
- Oct 27, 2009
- Messages
- 69
Hi,
I currently have the following formula that looks at 3 cells and then pulls through up to 3 codes into another cell using a VLOOKUP and CONCATENATE function.
The codes get pulled through fine, however if there are empty cells or the Vlookup should pull through a blank, then it's just showing commas.
Is there any way that the formula below could be re-written to only pull through commas if a number is pulled through (so it goes between two numbers)
=IF(a_Main!BN2="","",IF(a_Main!DE2="",CONCATENATE(VLOOKUP(a_Main!BN2,'Lookups'!$AH$10:$AI$33,2,FALSE),",",VLOOKUP(a_Main!BO2,'Lookups'!$AH$10:$AI$33,2,FALSE),),CONCATENATE(VLOOKUP(a_Main!BN2,'Lookups'!$AH$10:$AI$33,2,FALSE),",",VLOOKUP(a_Main!BO2,'Lookups'!$AH$10:$AI$33,2,FALSE),",",VLOOKUP(a_Main!DE2,'Lookups'!$AH$10:$AI$33,2,FALSE))))
Many thanks
I currently have the following formula that looks at 3 cells and then pulls through up to 3 codes into another cell using a VLOOKUP and CONCATENATE function.
The codes get pulled through fine, however if there are empty cells or the Vlookup should pull through a blank, then it's just showing commas.
Is there any way that the formula below could be re-written to only pull through commas if a number is pulled through (so it goes between two numbers)
=IF(a_Main!BN2="","",IF(a_Main!DE2="",CONCATENATE(VLOOKUP(a_Main!BN2,'Lookups'!$AH$10:$AI$33,2,FALSE),",",VLOOKUP(a_Main!BO2,'Lookups'!$AH$10:$AI$33,2,FALSE),),CONCATENATE(VLOOKUP(a_Main!BN2,'Lookups'!$AH$10:$AI$33,2,FALSE),",",VLOOKUP(a_Main!BO2,'Lookups'!$AH$10:$AI$33,2,FALSE),",",VLOOKUP(a_Main!DE2,'Lookups'!$AH$10:$AI$33,2,FALSE))))
Many thanks