255 Characters

gerald24

Board Regular
Joined
Apr 28, 2017
Messages
95
Hi,

Anyone who knows how to bypass the 255 Characters rule in VBA? I have to put something that has a formula containing 1599 characters. Unfortunately, I don't know how to incorporate the formula in vba.

TIA
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
One way is to break up the formula into parts defined as strings, then insert the formula as a concatenation of the parts. What formula do you want to use? Is it an array formula?
 
Upvote 0
Hi Joe,

It is one with a lot of IF Formulas, but I believe not an array. can you provide an example please? I can not picture it.
 
Upvote 0
Hi Joe,

It is one with a lot of IF Formulas, but I believe not an array. can you provide an example please? I can not picture it.
An array formula would be one that is confirmed using ctrl+shift+enter not just enter if you were entering it directly on a worksheet. When viewed in the formula bar it would be surrounded by curly brackets { and }.
 
Upvote 0
Hi Joe,

thanks for sharing that to me. Could you use the below formula to fix the codes?

=IF(B16=C16,"B Matches C",IF(B16=D16,"B Mathes D","Not matched"))


Thanks
 
Upvote 0
If it isn't an array formula, there is no 255 character limitation. For a simple formula like that, you just use something like this:

Rich (BB code):
Activecell.formula = "=IF(B16=C16,""B Matches C"",IF(B16=D16,""B Mathes D"",""Not matched""))"

Note that you have to double up any quotes that are part of the formula string, as highlighted above.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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