excel formula query

  Jeffers22 19:44 19 Oct 05

Seems simple, but the excel count formula says the COUNT function is only for where there is a number in a cell.

What I want to do is get a total number of cells within a range that have any letter in them. But, I want to look only at every second cell in a row starting from D4. So D4 D6 D8 D10 etc.

This has me stumped, probably not looking hard enough. Hope someone can help.


  VoG II 19:52 19 Oct 05

You need to use the COUNTA function.

But I don't know how to only look at every other row without coding in VBA.

  VoG II 19:57 19 Oct 05

Sub countother()

Dim iRow, kount

kount = 0

For iRow = 4 To 10 Step 2

If Range("D" & iRow).Value <> "" Then kount = kount + 1

Next iRow

MsgBox kount

End Sub

  Jeffers22 20:02 19 Oct 05

Thanks for that. Hmmmm

OK. Every other cell will contain a number, can I do a countif = L or B or N or C or B ? - there are only about 6 possible letters in "every other cell"

  VoG II 20:12 19 Oct 05


  Jeffers22 21:01 19 Oct 05

Thanks, that looks like the ticket. I'll try it and post back

  Jeffers22 21:05 19 Oct 05

Vog, a thousand thanks. That is spot on - and gives the correct result.

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

The updated 'Corel Painter inside Photoshop' plugin ParticleShop offers new brushes

New MacBook Pro 2017 release date, UK price and tech specs: Kaby Lake MacBook Pro to launch in…