Solved

Read top row,cell value from a table, Excel 2010

Posted on 2013-01-10
4
290 Views
Last Modified: 2013-02-13
Hi,
Can you pls suggest me in reading top (row,cell) value from a excel 2010 table
FYI, Table -> is from SQL datasource

example i have a table named (MyTable) .. which can be filtered
A        B            C
1      Name      Dept          Project
2      Henry      501            GGG
3      Lynn              201            GGG
7      Henry      401            KKK
8      Joe            101            RRR
9      Lynn              301            KKK

Rrequirement : always read value from the (first row , second column) from the table.

Note:- Table can be filtered.

Thanks
0
Comment
Question by:kishan66
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 250 total points
ID: 38763288
MyCell = Cells(1, 2).Value
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 250 total points
ID: 38763332
Do you mean the first visible row, or just the first row even if it's hidden?
If the former, perhaps:

msgbox Activesheet.Listobjects(1).ListColumns(2).DataBodyRange.Specialcells(xlcelltypevisible).cells(1)

Open in new window

0
 

Author Comment

by:kishan66
ID: 38763464
rorya,

its the first visible row.

i dont understand ur suggested answer.

can u give an example w.r.t. the below table -> Table Name # MyTable
A        B            C
1      Name      Dept          Project
2      Henry      501            GGG
3      Lynn              201            GGG
7      Henry      401            KKK
8      Joe            101            RRR
9      Lynn              301            KKK

Now filter table column B by "Henry". MyTable is srinked to two rows (in this instance).
Now i want 1st row, 2nd column value.

Expected Output :  Henry

How should i get that.
0
 

Author Closing Comment

by:kishan66
ID: 38886560
I want to close the ticket/issue as i did not get the answer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now