Solved

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

Posted on 2013-01-10
4
289 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 45

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

757 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

21 Experts available now in Live!

Get 1:1 Help Now