Hi!
I'm a newbie in excel but I'm learning and i would apriciate if someone
would help me.
I know something from the VB code because i work a little bit in VB .NET so
i just need some instructions for the VB references (my english is bad, so i
don't know which word to use) for excel.
First:
In the first row I would like to determine which cell is the last with any
data(but only the first row, row 1).
And in the first column I would like to determine which row is the last
with any data(but only the first column, column A)
Second:
How do i position myself in a cell? Let's say cell K15.
Thanks to everyone who is willing to help!
Marko SvacoTo find the last cell in any row, use this macro
Sub findlast()
myrow = Application.InputBox(quot;What rowquot;)
firstcell = quot;IVquot; amp; myrow
Set mc = Range(firstcell).End(xlToLeft)
MsgBox (mc.Address)
End Sub
If only row 1 is of interest
Sub findlast()
Set mc = Range(quot;IV1quot;).End(xlToLeft)
MsgBox (mc.Address)
End SubTo select a certain cell (say A10)
Range(quot;A10quot;).Select
or
Cells(1,10).Select
best wishes
suggest you look for VBA tutorial and/or book
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
quot;markoquot; gt; wrote in message ...
gt; Hi!
gt; I'm a newbie in excel but I'm learning and i would apriciate if someone
gt; would help me.
gt; I know something from the VB code because i work a little bit in VB .NET
gt; so
gt; i just need some instructions for the VB references (my english is bad, so
gt; i
gt; don't know which word to use) for excel.
gt;
gt; First:
gt; In the first row I would like to determine which cell is the last with any
gt; data(but only the first row, row 1).
gt; And in the first column I would like to determine which row is the last
gt; with any data(but only the first column, column A)
gt;
gt; Second:
gt; How do i position myself in a cell? Let's say cell K15.
gt;
gt; Thanks to everyone who is willing to help!
gt;
gt; Marko Svaco
gt;
gt;
gt;
gt;
Thanks for all your help!!!
Can you recomend some free online tutorial for VBA?
Best Regards,
Marko
quot;Bernard Liengmequot; gt; wrote in message
...
gt; To find the last cell in any row, use this macro
gt; Sub findlast()
gt; myrow = Application.InputBox(quot;What rowquot;)
gt; firstcell = quot;IVquot; amp; myrow
gt; Set mc = Range(firstcell).End(xlToLeft)
gt; MsgBox (mc.Address)
gt; End Sub
gt;
gt; If only row 1 is of interest
gt; Sub findlast()
gt; Set mc = Range(quot;IV1quot;).End(xlToLeft)
gt; MsgBox (mc.Address)
gt; End Sub
gt;
gt;
gt; To select a certain cell (say A10)
gt; Range(quot;A10quot;).Select
gt; or
gt; Cells(1,10).Select
gt;
gt; best wishes
gt; suggest you look for VBA tutorial and/or book
gt; --
gt; Bernard V Liengme
gt; www.stfx.ca/people/bliengme
gt; remove caps from email
gt;
gt; quot;markoquot; gt; wrote in message ...
gt;gt; Hi!
gt;gt; I'm a newbie in excel but I'm learning and i would apriciate if someone
gt;gt; would help me.
gt;gt; I know something from the VB code because i work a little bit in VB .NET
gt;gt; so
gt;gt; i just need some instructions for the VB references (my english is bad,
gt;gt; so i
gt;gt; don't know which word to use) for excel.
gt;gt;
gt;gt; First:
gt;gt; In the first row I would like to determine which cell is the last with
gt;gt; any
gt;gt; data(but only the first row, row 1).
gt;gt; And in the first column I would like to determine which row is the last
gt;gt; with any data(but only the first column, column A)
gt;gt;
gt;gt; Second:
gt;gt; How do i position myself in a cell? Let's say cell K15.
gt;gt;
gt;gt; Thanks to everyone who is willing to help!
gt;gt;
gt;gt; Marko Svaco
gt;gt;
gt;gt;
gt;gt;
gt;gt;
gt;
gt;
- Jun 22 Fri 2007 20:38
About going through all the cells in a sheet....
close
全站熱搜
留言列表
發表留言