Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Okay guys so i tried to convert some code i found for last Row with text in
it.. Function LastColumn(Row As String) LastColumn = Range(Columns.Count & Row).End(xlToRight).Column End Function But i get an error when trying to use it Does anybody know how to convert this to get the last column with text with the Row is supplied? Thanks!! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Try this LastCol = ActiveSheet.Cells(2, Columns.Count).End(xlToLeft).Column the 2 represents row 2 so change to suit Mike "Myles" wrote: Okay guys so i tried to convert some code i found for last Row with text in it.. Function LastColumn(Row As String) LastColumn = Range(Columns.Count & Row).End(xlToRight).Column End Function But i get an error when trying to use it Does anybody know how to convert this to get the last column with text with the Row is supplied? Thanks!! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm sorry, i meant last COLUMN that has text in it on one specific row. So
basically i know what row i want to look on, i just need to find out which column it is and convert it to the letter. Thanks!! "Myles" wrote: Okay guys so i tried to convert some code i found for last Row with text in it.. Function LastColumn(Row As String) LastColumn = Range(Columns.Count & Row).End(xlToRight).Column End Function But i get an error when trying to use it Does anybody know how to convert this to get the last column with text with the Row is supplied? Thanks!! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try it this way
Function LastColumn(x) LastColumn = Cells(x, Columns.Count).End(xlToLeft).Column End Function -- Don Guillett Microsoft MVP Excel SalesAid Software "Myles" wrote in message ... Okay guys so i tried to convert some code i found for last Row with text in it.. Function LastColumn(Row As String) LastColumn = Range(Columns.Count & Row).End(xlToRight).Column End Function But i get an error when trying to use it Does anybody know how to convert this to get the last column with text with the Row is supplied? Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
compare data in column A with column B to find duplicates | Excel Discussion (Misc queries) | |||
find the data of the corresponding column | New Users to Excel | |||
Find Last data in a column | Excel Worksheet Functions | |||
HOW DO I FIND DATA IN A TABLE BY LOOKING UP BOTH THE COLUMN AND R. | Excel Worksheet Functions | |||
find rows for unique data in 1 column and different data in other. | Excel Discussion (Misc queries) |