finding each blank in a cell

oldbrewer

Well-known Member
Joined
Apr 11, 2010
Messages
11,012
I am trying to find the location of all the blanks in a cell - the cell is woooord1 thru to word12 below
blankblankblankblankblankblankblankblankblankblankblank
1234567891011
charactersblankswords917171717171717173434
woooord1 worddd2 wwwwwwwwwwwword3 word4 word5 word6 word7 word8 word9 word10 word11 word12901112
formula in first results cell which correctly gives 9 is =FIND(" ",$D$8,FIND(" ",$D$8)+I6-1)
this cell is I7 and has been copied across
the sentence is in D8
the second blank is correctly found
third and subsequent blanks are not found
can anybody tell me why please?

<colgroup><col><col span="2"><col><col><col><col><col span="10"></colgroup><tbody>
</tbody>
 
No. " "aa" "" "aaa" "aa" "aaa" "aa" "a" "aaa" "aaa
they are 1,4,5,9,12,16,19,21,25

Yes, B3 is supposed to be blank.
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
now agree your formula works perfectly - but - I cannot see the logic of it - you are using the position of the previous blank to generate the position of the next blank - is it looking for the first blank AFTER a specific character number?
 
Upvote 0
Right, you are using the position of the previous because the the find formula uses a start number. The first time you use the formula, it is looking for the " " in 0+1= 1, on or after position 1 . The second time it would be 1+1=2, on or after position 2. The third time it would be 4+1=5, on or after postion 5.

Before when you had the formula looking at your header to pull the number and getting the 3,3,3,7,7,7,... it was doing 0+1=1 on or after position 1, 1+1=2 on or after position 2, 2+1=3 on or after position 3, 3+1=4 on or after position 4.

Hope that helps. :)
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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