Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default read the values from a excel row

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default read the values from a excel row

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default read the values from a excel row

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
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
Values?? Please Read Below. CHR1S New Users to Excel 2 August 18th 09 10:28 PM
Read Excel row values shantanu Excel Worksheet Functions 4 November 28th 07 08:03 AM
read the values from a excel row shantanu Excel Worksheet Functions 2 July 13th 07 09:22 AM
Read values from an Excel Table? Webtechie Excel Programming 3 January 29th 07 09:03 PM
how do i read off values from a chart created in excel? rachel Excel Discussion (Misc queries) 0 December 11th 05 05:31 PM


All times are GMT +1. The time now is 12:12 PM.

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

About Us

"It's about Microsoft Excel"