Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
I am trying to read the values from a excel row. There are 89 columns for each row and same number of data in each rows. Kindly help regards shantanu |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Depend what you are doing and what you mean by "read", but here's one way:
Dim Vals As Variant Vals = Range(Cells(1, 1), Cells(1, 89)).Value 'Note you get a 2-D array even for one row Debug.Print Vals(1, 29) Maybe look at Transpose also. Also, if you must post to more than one NG, cross-post, not multi-post. If this means nothing to you, read: http://www.cs.tut.fi/~jkorpela/usenet/xpost.html NickHK "shantanu" wrote in message ups.com... hi I am trying to read the values from a excel row. There are 89 columns for each row and same number of data in each rows. Kindly help regards shantanu |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not really sure what you are trying to achieve but the following example
gives a simplistic way of reading the data and displaying in a message box so perhaps it will give you a lead on what you need to do. You indicated that the number of columns is fixed and the following sets the number of columns but can have any number of rows and stops when it does not find any more data in the first column of a row. Sub Read_Cell_Values() Dim rowNumber Dim firstColumn Dim numbColumns rowNumber = 2 'Set to match the first row of your data firstColumn = 1 'Set to match first column number with data numbColumns = 89 'Set to number of columns of data Do While Len(Trim(Cells(rowNumber, firstColumn))) < 0 For i = firstColumn To numbColumns MsgBox Cells(rowNumber, i).Value Next i rowNumber = rowNumber + 1 Loop End Sub Regards, OssieMac "shantanu" wrote: hi I am trying to read the values from a excel row. There are 89 columns for each row and same number of data in each rows. Kindly help regards shantanu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Values?? Please Read Below. | New Users to Excel | |||
Read Excel row values | Excel Worksheet Functions | |||
read the values from a excel row | Excel Worksheet Functions | |||
Read values from an Excel Table? | Excel Programming | |||
how do i read off values from a chart created in excel? | Excel Discussion (Misc queries) |