IF formula imbedded with concatenation

Peggy2015

Board Regular
Joined
Oct 19, 2015
Messages
109
Hello,
How do I write a formula to:
1. Determine if a cell is labelled "Cash", "Cheque" or "EFT"
2. If it is then I need to concatenate certain cells together.

Example:


Thanks for your help.

Best wishes,
Peggy
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Cash[/TD]
[TD]Stationery[/TD]
[TD][/TD]
[TD]{formula = }Cash - Stationery[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cash[/TD]
[TD]Cards[/TD]
[TD][/TD]
[TD]{formula = }Cash - Cards[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Cheque[/TD]
[TD]Rooms[/TD]
[TD][/TD]
[TD]{formula = }Cheque - Rooms[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]EFT[/TD]
[TD]Stationery[/TD]
[TD][/TD]
[TD]{formula = }EFT - Stationery[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]EFT[/TD]
[TD]Cards[/TD]
[TD][/TD]
[TD]{formula = }EFT - Cards[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
From your data I am not sure why you need an IF statement, if your data is laid out that way then you can just use concatenate.
 
Upvote 0
Hi!

Try this in D1 and copy down:

=IF(OR(A1={"Cash";"Cheque";"EFT"}),A1&" - "&B1,"")


[TABLE="class: grid, width: 331"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Cash[/TD]
[TD]Stationery[/TD]
[TD][/TD]
[TD]Cash - Stationery[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cash[/TD]
[TD]Cards[/TD]
[TD][/TD]
[TD]Cash - Cards[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]TextA01[/TD]
[TD]TextB02[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Cheque[/TD]
[TD]Rooms[/TD]
[TD][/TD]
[TD]Cheque - Rooms[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]TextA02[/TD]
[TD]TextB03[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]EFT[/TD]
[TD]Stationery[/TD]
[TD][/TD]
[TD]EFT - Stationery[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]TextA03[/TD]
[TD]TextB04[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]ETF[/TD]
[TD]Cards[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]***[/TD]
[TD]********[/TD]
[TD]**********[/TD]
[TD]**[/TD]
[TD]****************[/TD]
[TD]**[/TD]
[/TR]
</tbody>[/TABLE]


Markmzz
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top