Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
marko
 
Posts: n/a
Default About going through all the cells in a sheet....

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 Svaco




  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default About going through all the cells in a sheet....

To find the last cell in any row, use this macro
Sub findlast()
myrow = Application.InputBox("What row")
firstcell = "IV" & myrow
Set mc = Range(firstcell).End(xlToLeft)
MsgBox (mc.Address)
End Sub

If only row 1 is of interest
Sub findlast()
Set mc = Range("IV1").End(xlToLeft)
MsgBox (mc.Address)
End Sub


To select a certain cell (say A10)
Range("A10").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

"marko" wrote in message ...
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 Svaco






  #3   Report Post  
Posted to microsoft.public.excel.misc
marko
 
Posts: n/a
Default About going through all the cells in a sheet....

Thanks for all your help!!!
Can you recomend some free online tutorial for VBA?
Best Regards,

Marko

"Bernard Liengme" wrote in message
...
To find the last cell in any row, use this macro
Sub findlast()
myrow = Application.InputBox("What row")
firstcell = "IV" & myrow
Set mc = Range(firstcell).End(xlToLeft)
MsgBox (mc.Address)
End Sub

If only row 1 is of interest
Sub findlast()
Set mc = Range("IV1").End(xlToLeft)
MsgBox (mc.Address)
End Sub


To select a certain cell (say A10)
Range("A10").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

"marko" wrote in message ...
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 Svaco








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
lock tab in sheet 2 until cell in sheet one is completed john tempest Excel Worksheet Functions 7 November 24th 05 08:45 AM
Formula to copy rng of cells where (value is met) to anther sheet Exit Advantage Excel Worksheet Functions 3 November 12th 05 02:59 AM
how can you view cells from different worksheets in to one sheet,. myasin Excel Discussion (Misc queries) 1 June 17th 05 10:25 PM
Entering Data in multiple cells on one sheet & having it auto upda haynblend Excel Worksheet Functions 2 March 27th 05 12:41 AM


All times are GMT +1. The time now is 10:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"