Solved

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

Posted on 2013-01-10
4
295 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 47

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

752 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