ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   expanding results (https://www.excelbanter.com/excel-discussion-misc-queries/126133-expanding-results.html)

CheekyChappie

expanding results
 
I have a list of data which sums up to make the total. What I want to do is
hide the detail, but show it if someone clicks on the total.

For example, I have Product 1, product 2 and product 3 listed with their
sales next to them.

The top row is TOTAL SALES and has their combined total. I want to be able
to hide the product detail, but click on the TOTAL SALES cell to expand and
then contract the data - can this be done?

Bob Phillips

expanding results
 
Can you detail the data, where is the Product 1 data, Product 2 etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CheekyChappie" wrote in message
...
I have a list of data which sums up to make the total. What I want to do

is
hide the detail, but show it if someone clicks on the total.

For example, I have Product 1, product 2 and product 3 listed with their
sales next to them.

The top row is TOTAL SALES and has their combined total. I want to be

able
to hide the product detail, but click on the TOTAL SALES cell to expand

and
then contract the data - can this be done?




CheekyChappie

expanding results
 
ok, here is the detail


TOTAL PRODUCTS 500
Product A 50
Product B 150
Product C 300

So the Products are directly below the total line.

I want to be able to show the TOTAL PRODUCTS line only, but if they click on
that cell, it expands to show the products underneath as it is about, and
again to minimise them.

Hope this is clearer.







"Bob Phillips" wrote:

Can you detail the data, where is the Product 1 data, Product 2 etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CheekyChappie" wrote in message
...
I have a list of data which sums up to make the total. What I want to do

is
hide the detail, but show it if someone clicks on the total.

For example, I have Product 1, product 2 and product 3 listed with their
sales next to them.

The top row is TOTAL SALES and has their combined total. I want to be

able
to hide the product detail, but click on the TOTAL SALES cell to expand

and
then contract the data - can this be done?





PMC1

expanding results
 
You Could use Grouping.

Highlight the Detail Rows Go to "Data" "Group & Outline" and
click "Group"

You wil see a + (Plus) sign appear beside the detail which can be used
to toggle hide or display the view.

Paul


CheekyChappie wrote:
ok, here is the detail


TOTAL PRODUCTS 500
Product A 50
Product B 150
Product C 300

So the Products are directly below the total line.

I want to be able to show the TOTAL PRODUCTS line only, but if they click on
that cell, it expands to show the products underneath as it is about, and
again to minimise them.

Hope this is clearer.







"Bob Phillips" wrote:

Can you detail the data, where is the Product 1 data, Product 2 etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CheekyChappie" wrote in message
...
I have a list of data which sums up to make the total. What I want to do

is
hide the detail, but show it if someone clicks on the total.

For example, I have Product 1, product 2 and product 3 listed with their
sales next to them.

The top row is TOTAL SALES and has their combined total. I want to be

able
to hide the product detail, but click on the TOTAL SALES cell to expand

and
then contract the data - can this be done?






PMC1

expanding results
 
You Could use Grouping.

Highlight the Detail Rows Go to "Data" "Group & Outline" and
click "Group"

You wil see a + (Plus) sign appear beside the detail which can be used
to toggle hide or display the view.

Paul


CheekyChappie wrote:
ok, here is the detail


TOTAL PRODUCTS 500
Product A 50
Product B 150
Product C 300

So the Products are directly below the total line.

I want to be able to show the TOTAL PRODUCTS line only, but if they click on
that cell, it expands to show the products underneath as it is about, and
again to minimise them.

Hope this is clearer.







"Bob Phillips" wrote:

Can you detail the data, where is the Product 1 data, Product 2 etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CheekyChappie" wrote in message
...
I have a list of data which sums up to make the total. What I want to do

is
hide the detail, but show it if someone clicks on the total.

For example, I have Product 1, product 2 and product 3 listed with their
sales next to them.

The top row is TOTAL SALES and has their combined total. I want to be

able
to hide the product detail, but click on the TOTAL SALES cell to expand

and
then contract the data - can this be done?






Bob Phillips

expanding results
 
Try this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "A1" '<=== change to suit

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Me.Rows("2:4").Hidden = False
Else
Me.Rows("2:4").Hidden = True
End If

End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.





--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CheekyChappie" wrote in message
...
ok, here is the detail


TOTAL PRODUCTS 500
Product A 50
Product B 150
Product C 300

So the Products are directly below the total line.

I want to be able to show the TOTAL PRODUCTS line only, but if they click

on
that cell, it expands to show the products underneath as it is about, and
again to minimise them.

Hope this is clearer.







"Bob Phillips" wrote:

Can you detail the data, where is the Product 1 data, Product 2 etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CheekyChappie" wrote in

message
...
I have a list of data which sums up to make the total. What I want to

do
is
hide the detail, but show it if someone clicks on the total.

For example, I have Product 1, product 2 and product 3 listed with

their
sales next to them.

The top row is TOTAL SALES and has their combined total. I want to be

able
to hide the product detail, but click on the TOTAL SALES cell to

expand
and
then contract the data - can this be done?








All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com