Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 8 Jan., 00:02, dbKemp wrote:
I am creating an addin that works with user created 'databases'. Assume there is a 'database' *that looks something like: * Name | Phone | Address | City | State * Dave * | * * * * * | * * * * * * *| * * * *| * Thom *| * * * * * | * * * * * * *| * * * *| * Mary * | * * * * * | * * * * * * *| * * * *| * Joe * * | * * * * * | * * * * * * *| * * * *| * Beth * | * * * * * | * * * * * * *| * * * *| * Sue * * |12345 | Home * * |Town |NY It can be anywhere on a given worksheet, the only requirement is that is have no blanks in the first row. The 'database' is user created so the code doesn't know how many columns or rows, or where the upper left corner is. When the user clicks on a cell within the bounds of the 'database' and then clicks on a menu button provided by the addin, some action is taken on the database. When the database is not sparse using activecell.currentregion works fine. *When the 'database' is sparse activecell.currentregion doesn't work. *e.g. user clicked on Mary's Address above. Any suggestions on how to define the database (CurrentRegion) with sparse data? Try Activecell.end(xltoLeft).currentRegion //Per |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 7, 6:29 pm, Per Jessen wrote:
On 8 Jan., 00:02, dbKemp wrote: I am creating an addin that works with user created 'databases'. Assume there is a 'database' that looks something like: Name | Phone | Address | City | State Dave | | | | Thom | | | | Mary | | | | Joe | | | | Beth | | | | Sue |12345 | Home |Town |NY It can be anywhere on a given worksheet, the only requirement is that is have no blanks in the first row. The 'database' is user created so the code doesn't know how many columns or rows, or where the upper left corner is. When the user clicks on a cell within the bounds of the 'database' and then clicks on a menu button provided by the addin, some action is taken on the database. When the database is not sparse using activecell.currentregion works fine. When the 'database' is sparse activecell.currentregion doesn't work. e.g. user clicked on Mary's Address above. Any suggestions on how to define the database (CurrentRegion) with sparse data? Try Activecell.end(xltoLeft).currentRegion //Per Thanks. Good suggestion, poor example provided (on my part). There could be a row with no name, but have a value in the state column. Using a Activecell.end() function could end up 'finding' a 'island' cell that has a value, but no other cells around with a value so the CurrentRegion still wouldn't work. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using LINEST with a sparse data row? | Excel Programming | |||
How do I graph a pivot table of sparse values? | Charts and Charting in Excel | |||
Can you Sparse a field in Excel??? and Database Query?? | Excel Discussion (Misc queries) | |||
Efficent way of setting sparse array of formulas? | Excel Programming | |||
finding last row number of UsedRange | Excel Programming |