Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can i read a specific coloumn values and get its contents?

Hi,

Can anyone plz tell me how to read a specific column values and get its
contents.
I managed to read the specific sheet tat i want and now i need to get the
first column values and also first column count..... and get its contents...

I dont want to use oledb, ie reading from database.. i checked some posts,
but all those are reading database... i dont want it....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default How can i read a specific coloumn values and get its contents?


There are a lot of ways. To read cell contents. Here is one:

Sub readValsInCol()

Const myColumn = "A"
'Change to "B" "C", "D", "AB" etc
'depending which column you wish to check
' If you need to read more columns you need
' to change code

strt = ActiveSheet.UsedRange.Row
'gives first row of the used range

fin = ActiveSheet.UsedRange.Rows.Count
'gives number of rows in the used range

For i = strt To fin
'loop through rows of the used range
myval = Range(myColumn & i).Value
Debug.Print myval ' do what you wish here
Next i

End Sub

--
Steve

"vidhya" wrote in message
...
Hi,

Can anyone plz tell me how to read a specific column values and get its
contents.
I managed to read the specific sheet tat i want and now i need to get the
first column values and also first column count..... and get its
contents...

I dont want to use oledb, ie reading from database.. i checked some posts,
but all those are reading database... i dont want it....


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can i read a specific coloumn values and get its contents?


hi thank u so much, i got the no of filled rows....


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
How do you sum values in a coloumn when it contains #N/A in a ran. Tom Ogilvy Excel Programming 0 September 21st 04 06:46 PM
How do you sum values in a coloumn when it contains #N/A in a ran. sebastienm Excel Programming 0 September 21st 04 06:35 PM
How do you sum values in a coloumn when it contains #N/A in a ran. Jack Schitt Excel Programming 0 September 21st 04 06:32 PM
How do you sum values in a coloumn when it contains #N/A in a ran. Jim Thomlinson[_3_] Excel Programming 0 September 21st 04 06:31 PM
How do you sum values in a coloumn when it contains #N/A in a ran. sa Excel Programming 0 September 21st 04 06:17 PM


All times are GMT +1. The time now is 10:23 AM.

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

About Us

"It's about Microsoft Excel"