Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It could be a built-in constant or you could as the User:
Sub findit() Dim n As Long n = Application.InputBox(Prompt:="enter ruw number") MsgBox (Cells(n, Columns.Count).End(xlToLeft).Column) End Sub -- Gary''s Student - gsnu2007b "Andrius B." wrote: OK, that I have understand myself, at what place the desired row number is to be specified :) Thank You both for the code. "Gary''s Student" wrote in message ... For row #13, for example: Sub findit() MsgBox (Cells(13, Columns.Count).End(xlToLeft).Column) End Sub -- Gary''s Student - gsnu2007b "Andrius B." wrote: Hi. I hope someone could help me this time, too. I need to find the last used cell (that is, not empty, contains some data) in a Row and to get the column number, witch contains that cell. E.G. such rows person1 | 4556 | | 4564 | | | person2 | www | | | | dddddd | So, if I specify a row number 1, the code should return "4", and for the second row - "6". I have tried many examples from Internet, but they return either the first column or number "256"... Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Worksheet Functions | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) |