Need a lisp that will count blocks until I reach my number (NOT BCOUNT)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have 3 different size blocks that I need to add up to an exact number. BCOUNT works great but it takes up too much time when I have to select the section with the blocks, press enter and add the blocks with my calculator. If I'm short I will have to go back and select a few more until I hit my number (which changes per project). So I need something that will keep on adding these blocks up until I hit the number I need to. Example below.
Block "ABC" = 1 string
Block "ABCD" = 2 strings
Block "ABCDE" = 3 strings
BCOUNT results
ABC= 50 50x1=50
ABCD= 75 75x2=150
ABCDE=12 12x3=36
236
Hope someone can help me with this.