• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How can I write a formula or Macro to count blank spaces

I want to count the spaces vertically between the letter groups eo,oo,oe and ee. In the picture below in the example is G:7 and G:3 would have 3 empty spaces so I want to put a 3 in the box L:4 under oe. Another example is between D:10 an D:8 is 1 space so I would put a 1 in the box I:9 under ee. I can use a Macro or formula and appreciate all your help!!!!!

Hopefully this makes sense
 

Attachments

  • image.jpg
    image.jpg
    139.4 KB · Views: 7
Hi Larry ,

I think you have shown the arrows pointing to column L incorrectly , since after the 3 in L4 , there should be only 2 arrows , not 3.

If this is so , then in L3 , enter the following formula and copy down.

=IF(G3=G$1,"",MATCH(G$1,G4:G$21,0))

This same formula can be copied across to I3 , J3 and K3.

Narayan
 
Hi Larry ,

I think you have shown the arrows pointing to column L incorrectly , since after the 3 in L4 , there should be only 2 arrows , not 3.

If this is so , then in L3 , enter the following formula and copy down.

=IF(G3=G$1,"",MATCH(G$1,G4:G$21,0))

This same formula can be copied across to I3 , J3 and K3.

Narayan

For some reason it is bringing up errors

I3: =IF(D2=D$1,MATCH(D$1,D3:D1000,0)-1,"")
copy across and down

I want to count the spaces vertically between the letter groups eo,oo,oe and ee. In the picture below in the example is G:7 and G:3 would have 3 empty spaces so I want to put a 3 in the box L:4 under oe. Another example is between D:10 an D:8 is 1 space so I would put a 1 in the box I:9 under ee. I can use a Macro or formula and appreciate all your help!!!!!

Hopefully this makes sense
 

Attachments

  • 3-14-2015 12-36-16 AM.jpg
    3-14-2015 12-36-16 AM.jpg
    118.6 KB · Views: 1
I3: =IF(D2=D$1,MATCH(D$1,D3:D1000,0)-1,"")
copy across and down



PERFECT HUI!!!!! THANK YOU SO MUCH!!!!

No biggie and not sure it it brings up an error in 1 cell. For the other 99.9% its working perfectly

It may be because there is nothing in the ell above for t to count off of. I am not sure if that can remain blank and not show the ###
 

Attachments

  • 3-14-2015 12-38-00 AM.jpg
    3-14-2015 12-38-00 AM.jpg
    114.9 KB · Views: 2
Hi Larry ,

The MATCH function will return an error value if it does not find a match ; this is easily taken care of by wrapping an IFERROR around it as follows :

=IF(G3=G$1,"",IFERROR(MATCH(G$1,G4:G$21,0),""))

Narayan
 
Hi Deepak ,

As I have made it clear on earlier occasions , I am least bothered by cross-posting ; I answer a question if I find it interesting or educational ; it is immaterial if there are other answers ; if I can find at least one answer , it does not matter if there a dozen more ways of tackling the problem.

If I cannot solve a problem I am interested in tackling , then I make it a point to Google and see if there are answers to the problem.

Cross-posting does not bother me in the least.

Narayan
 
Hi NARAYANK991,

I agree with you on
Cross-posting does not bother me in the least.
but simultaneously raising the same thread in different forum & later comparing the response is something like judging themselves.

It will nice if both the forum having the links of cross posted so that one can also utilize the same for further/future use ...

if I can find at least one answer , it does not matter if there a dozen more ways of tackling the problem

If OP got the solution then what's the need to lookup another source.

In case of Jack: He is asking the question on both the forum without linking them.

So, last but not the least : i agree that cross posting isn't a big issue but not linking them is big concern.
 
Hi ,

How does it matter to me if someone else has answered while I am trying to answer ?

What matters to me is whether I can answer or not !

If I cannot answer , then it is immaterial whether the OP has cross-posted.

If I can answer , then also how does it matter if someone else has also answered ; I never claim my answers are unique or the best ; I am passionately interested in two things :

1. Helping others learn

2. Solving problems

On both counts , I don't care if anyone cross-posts.

Narayan
 
Hi Deepak ,

That is Chandoo's opinion.

I may not bother about cross-posting , but if I post a question , I will ensure that either I do not cross-post , or if I do , then I give full details of all the sites that I have posted my question on. As long as I am a member of this forum , I will abide by its rules.

Chandoo has not asked all members to be bothered by cross-posting !

Narayan
 
I actually wrote the Forum Rules and mostly maintain them

I developed the rules back in late 2009 when I answered the majority of the questions as a way to try and put some order into a previously unordered new community.

I and am happy to have a private conversation, between the Ninjas, about them at any time.
 
Het guys, my fault and my apologies. I do not want to start any problems. We own a Café at our local airport and have an airshow all day and my son (bless his heart) is trying to help me get this answered. I did mention to him a time before about cross posting and if he does to make sure he incudes both links. I will take all responsibility if any rules were violated and will speak with him again. I agree with Narayan's comments but at the same time need to abide by the rules of the forum.
 
Back
Top