Author Topic: Maximum Number of Characters in an Excel (2010) Formula = 8,192  (Read 14485 times)

Offline NavyGator

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 638
So, while working on a spreadsheet for handling COOP's today I came across something that was interesting and scary all at the same time.

The maximum number of characters that can be in an Excel (2010) formula are 8,192.

The interesting part is that I now know the limit. The scary part is I had to break my formula up into three parts. Hehehe.

Let the humor flow forth....

Offline Mimir

  • Sr. Member
  • ****
  • Posts: 157
That is one complicated formula!

Sent from my Motorola Atrix2

Offline kgustafson

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 1120
    • Lost Weekend Productions
Have you looked to shrink your reference points to single or double letters?  That may help shrink it a bit.
------
Visit at: You are not allowed to view links. Register or Login

Offline chrisatpsu

  • Sr. Member
  • ****
  • Posts: 3729
  • ahhh, yes... my new blink-i-nator 3000!!!
3 parts?  heh   simple arithmetic...  lol
To rule the entire tri-state area!  What's that? Perry the Platypus!!!

Offline NavyGator

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 638
You are not allowed to view links. Register or Login
Have you looked to shrink your reference points to single or double letters?  That may help shrink it a bit.

I thought of a different way yesterday but I figured I was so far down this path that I might as well finish it off to see the feasibility of the whole spreadsheet.

Offline NavyGator

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 638
You are not allowed to view links. Register or Login
3 parts?  heh   simple arithmetic...  lol

Right....again... <fp.

Offline rrowan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 5899
  • 08096
So its two Pixelnet Universes

Is the formula in binary?

Rick R.
Light Animation Hobby - Having fun and Learning at the same time. (21st member of DLA)
You are not allowed to view links. Register or Login
Warning SOME assembly required

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
i'm curious to see this formula  ;D

Offline mr2hogs

  • Full Member
  • ***
  • Posts: 50
Might I recommend you modify the formula from

=A1+A2+A3+A4+A...

to

= sum(A1:A5000)

 ;D

Offline NavyGator

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 638
You are not allowed to view links. Register or Login
So its two Pixelnet Universes

Is the formula in binary?

Rick R.

It is kind of ironic that it is 2 PixelNet universes.

Offline NavyGator

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 638
You are not allowed to view links. Register or Login
i'm curious to see this formula  ;D

I probably shouldn't do this...but....here it is. Well 1/3 of it anyways.

It is basically nested if statements. In hind sight there was a couple of other options to do this.
« Last Edit: February 09, 2012, by NavyGator »

Offline chrisatpsu

  • Sr. Member
  • ****
  • Posts: 3729
  • ahhh, yes... my new blink-i-nator 3000!!!
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
So its two Pixelnet Universes

Is the formula in binary?

Rick R.

It is kind of ironic that it is 2 PixelNet universes.

etherdongle, and you've got room to grow!
To rule the entire tri-state area!  What's that? Perry the Platypus!!!

Offline rm357

  • Sr. Member
  • ****
  • Posts: 1282
  • 31088
Not sure what you are trying to do, but I think that type of coding would be more appropriate as a virtual basic macro that you call rather than a formula embedded in a cell. If it doesn't work the first time, editing an debugging will be a nightmare.

The industry average is around 40 errors per thousand lines of code (before reviews). At 8000 characters, you probably have 4 errors... In each third... (I figured using 80 characters per line, which is really a long line)

RM
« Last Edit: February 10, 2012, by rm357 »
Robert
Warner Robins, Georgia, USA

Offline NavyGator

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 638
You are not allowed to view links. Register or Login
Not sure what you are trying to do, but I think that type of coding would be more appropriate as a virtual basic macro that you call rather than a formula embedded in a cell. If it doesn't work the first time, editing an debugging will be a nightmare.

The industry average is around 40 errors per thousand lines of code (before reviews). At 8000 characters, you probably have 4 errors... In each third... (I figured using 80 characters per line, which is really a long line)

RM

I was able to build it in sections, and there is some repetition in the code so it wasn't too bad to write. It just looks horrendous.

I have never used macros yet. I am looking at some to see how they work to try and figure them out.

If I am not mistaken, don't macros also cause security concerns?

Rich

Offline Mike Hill

  • Sr. Member
  • ****
  • Posts: 400
  • Here to learn
You are not allowed to view links. Register or Login
So, while working on a spreadsheet for handling COOP's today I came across something that was interesting and scary all at the same time.

The maximum number of characters that can be in an Excel (2010) formula are 8,192.

The interesting part is that I now know the limit. The scary part is I had to break my formula up into three parts. Hehehe.

You need to get the updated version of Excel, it far exceeds 8,192
Mike Hill
First display date 11-2011
"Never explain your actions, your enemies don't believe it and your friends don't need it."