Substitue problem - Helppppp please :)

slimimi

Well-known Member
Joined
May 27, 2008
Messages
532
Hi there.

Why cant i do this?

If c <> "" Then c.Offset(, 1).Formula = "=MT4|BID!" & Substitute(c, "/", "") & "m"

I am tring to place a formula in cell B based on the result of cell A but i also need to substitue the "/" from cell A too.

I thought the above would seem logical - but - it gives me a compile error.

Any suggestions please?

Thanks a million in advance...
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Could it be that there is no Substitute function in VBA?

Try Replace instead.
 
Upvote 0
Thank you norie - i feel so silly :(

Once the user selects the currency pair in Column 2 - my offset columns do not place a value into their cells until the user TABS on column 2. Even pressing Enter does not do it. Is there a code i can use to get around this? ,ie, making the offset columns place values in them upon user pressing Enter after making selection in Column 2 please

Thanks a million in advance.
Hope i am making sense.
 
Upvote 0
Sorry - please let me correct.

For some reason - i seem to have to Make Selection in Column 2 and then Exit Cell and then revisit selection cell again before the formulas are placed in the correct offset cells. Hmmm - this is quite frustrating. Would you happen to know how i can get round this?
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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