Substitute to include within a formula

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello Experts,

I am trying to add substitute formula in the formula in column K. I think the placement is wrong or something. Can anyone tell me where am I going wrong? I should get the same names in column K as in column J with the exception that where there is & It should be replaced with &. I need the right formula in K2 so that I can drag it down to the last row. If I drag it down to 2000 rows. it should show blank if the cell A2 is blank.
4. Import Bank Excel 2019 11.04.2021.xlsm
ABCDEFGHIJK
1Bank
2
302-03-2021ABC & Co.Payment236.00BankABC & Co.#VALUE!
402-03-2021Sunday & MondayContra5000.00BankSunday & Monday#VALUE!
502-03-2021SuspensePayment40000.00BankSuspense#VALUE!
602-03-2021ABC & Co.Receipt25000.00BankABC & Co.#VALUE!
702-03-2021SuspenseContra4000.00SuspenseBankFALSE
802-03-2021Sunday & MondayPayment3949.00BankSunday & Monday#VALUE!
902-03-2021SuspenseReceipt22147.00BankSuspense#VALUE!
1001-03-2021ABC & Co.Receipt17000.00BankABC & Co.#VALUE!
1101-03-2021SuspenseReceipt15910.00BankSuspense#VALUE!
1201-03-2021SuspenseReceipt6000.00BankSuspense#VALUE!
1301-03-2021SuspenseReceipt50000.00BankSuspense#VALUE!
1401-03-2021Sunday & MondayContra50000.00BankSunday & Monday#VALUE!
1501-03-2021ABC & Co.Payment36338.00BankABC & Co.#VALUE!
1601-03-2021SuspenseContra40000.00SuspenseBankFALSE
1701-03-2021SuspenseContra3000.00BankSuspense#VALUE!
1801-03-2021ABC & Co.Receipt13295.00BankABC & Co.#VALUE!
Sheet1
Cell Formulas
RangeFormula
J3:J18J3=IF(I3=$C$1,C3,$C$1)
K3:K18K3=IF(I3=$C$1,SUBSTITUTE(C3,"&","&",$C$1))
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
You have the closing bracket in the wrong place, it should be
Excel Formula:
=IF(I3=$C$1,SUBSTITUTE(C3,"&","&"),$C$1)
 
Upvote 0
Solution
Hi,

You have a misplaced bracket:

Book3.xlsx
ABCDEFGHIJK
1Bank
2
33/2/2021ABC & Co.Payment236BankABC & Co.ABC & Co.
43/2/2021Sunday & MondayContra5000BankSunday & MondaySunday & Monday
53/2/2021SuspensePayment40000BankSuspenseSuspense
63/2/2021ABC & Co.Receipt25000BankABC & Co.ABC & Co.
73/2/2021SuspenseContra4000SuspenseBankBank
83/2/2021Sunday & MondayPayment3949BankSunday & MondaySunday & Monday
93/2/2021SuspenseReceipt22147BankSuspenseSuspense
103/1/2021ABC & Co.Receipt17000BankABC & Co.ABC & Co.
113/1/2021SuspenseReceipt15910BankSuspenseSuspense
123/1/2021SuspenseReceipt6000BankSuspenseSuspense
133/1/2021SuspenseReceipt50000BankSuspenseSuspense
143/1/2021Sunday & MondayContra50000BankSunday & MondaySunday & Monday
153/1/2021ABC & Co.Payment36338BankABC & Co.ABC & Co.
163/1/2021SuspenseContra40000SuspenseBankBank
173/1/2021SuspenseContra3000BankSuspenseSuspense
183/1/2021ABC & Co.Receipt13295BankABC & Co.ABC & Co.
Sheet910
Cell Formulas
RangeFormula
J3:J18J3=IF(I3=$C$1,C3,$C$1)
K3:K18K3=IF(I3=$C$1,SUBSTITUTE(C3,"&","&"),$C$1)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,217
Members
449,074
Latest member
cancansova

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