Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
checking that cells have a value before the workbook will close | Excel Worksheet Functions | |||
lock tab in sheet 2 until cell in sheet one is completed | Excel Worksheet Functions | |||
Formula to copy rng of cells where (value is met) to anther sheet | Excel Worksheet Functions | |||
how can you view cells from different worksheets in to one sheet,. | Excel Discussion (Misc queries) | |||
Entering Data in multiple cells on one sheet & having it auto upda | Excel Worksheet Functions |