Minggu, 16 Desember 2012

[ExcelVBA] Find position of first non-zero in range

 



This procedure helps me find the position of the first non-zero value in a range C10:K10. There will always be at least one.

Sub finnførsteikke0()

teller = 0

While range("c10").Offset(0, teller) = 0
teller = teller + 1
Wend

teller = teller + 1

MsgBox (teller)

End Sub

Can any of you help me with a formula giving me the same answer?

Thank you!

regards

Torstein
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------

Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use • Send us Feedback
.

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar