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.... |
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.... |
How can i read a specific coloumn values and get its contents?
hi thank u so much, i got the no of filled rows.... |
All times are GMT +1. The time now is 08:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com