ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Deriving several lists from a master list (https://www.excelbanter.com/excel-worksheet-functions/447217-deriving-several-lists-master-list.html)

John Tonitto

Deriving several lists from a master list
 
I have a master list that i need to separate out into sevral lists based on there values (see example)

Additionally, I would like that the redistributed lists contain the values and discriptions from the master list and be listed on consective lines.

List A
Kitchen 5000
Toilet 300
Taps 100
Lights 400
Carpets 2300
Tiles 1600
Doors 900


List b List c List d
< $300 $300 - $1200 Above $1200
Toilet 300 Lights 400 Kitchen 5000
Taps 100 Doors 900 Carpets 2300
Tiles 1600

Cheers
John

[email protected]

Deriving several lists from a master list
 
On Monday, September 24, 2012 6:49:33 PM UTC-7, John Tonitto wrote:
I have a master list that i need to separate out into sevral lists based

on there values (see example)



Additionally, I would like that the redistributed lists contain the

values and discriptions from the master list and be listed on consective

lines.

Hi John,

Give this a try.
Whe
A2:A8 holds the "Kitchen thru Doors" items
B2:B8 holds the costs.
H1 has header of <300
I1 has header of 300-1200
J1 has header of 1200

Option Explicit
Sub SortCount()
Dim i As Integer
Dim c As Range
i = ActiveCell.Value

For Each c In Range("B2:B8")
If c.Value < 299 Then c.Offset(0, -1). _
Copy Range("H100").End(xlUp).Offset(1, 0)
If c.Value 299 And c.Value < 1201 Then c.Offset(0, -1). _
Copy Range("I100").End(xlUp).Offset(1, 0)
If c.Value 1200 Then c.Offset(0, -1). _
Copy Range("J100").End(xlUp).Offset(1, 0)
Next
End Sub

HTH
Regards,
Howard









List A

Kitchen 5000

Toilet 300

Taps 100

Lights 400

Carpets 2300

Tiles 1600

Doors 900





List b List c List d

< $300 $300 - $1200 Above $1200

Toilet 300 Lights 400 Kitchen 5000

Taps 100 Doors 900 Carpets 2300

Tiles 1600



Cheers

John









--

John Tonitto



Don Guillett[_2_]

Deriving several lists from a master list
 
On Monday, September 24, 2012 8:49:33 PM UTC-5, John Tonitto wrote:
I have a master list that i need to separate out into sevral lists based

on there values (see example)



Additionally, I would like that the redistributed lists contain the

values and discriptions from the master list and be listed on consective

lines.



List A

Kitchen 5000

Toilet 300

Taps 100

Lights 400

Carpets 2300

Tiles 1600

Doors 900





List b List c List d

< $300 $300 - $1200 Above $1200

Toilet 300 Lights 400 Kitchen 5000

Taps 100 Doors 900 Carpets 2300

Tiles 1600



Cheers

John









--

John Tonitto


Unless you have a REALLY good reason, do NOT do that. Simply use datafilterautofiter instead

John Tonitto

Quote:

Originally Posted by Don Guillett[_2_] (Post 1605849)
On Monday, September 24, 2012 8:49:33 PM UTC-5, John Tonitto wrote:
I have a master list that i need to separate out into sevral lists based

on there values (see example)



Additionally, I would like that the redistributed lists contain the

values and discriptions from the master list and be listed on consective

lines.



List A

Kitchen 5000

Toilet 300

Taps 100

Lights 400

Carpets 2300

Tiles 1600

Doors 900





List b List c List d

< $300 $300 - $1200 Above $1200

Toilet 300 Lights 400 Kitchen 5000

Taps 100 Doors 900 Carpets 2300

Tiles 1600



Cheers

John









--

John Tonitto


Unless you have a REALLY good reason, do NOT do that. Simply use datafilterautofiter instead

Thanks Don & Howard,

Firstly let me say that my experience in excel is mainly formulas and not coding/macros.

What I am trying to achieve is this:
I have a large list that dependant on outcomes will have only a portion of rows in that list with values and when circumstances changes there could be different rows in the list with values.

I really need a way to import only the rows that have value in the list into a word report ie only show the rows with data. Is this possible? I have tried hiding rows and columns and then importing them. This is cumbersome. Is there another way?

Thanks for your help so far.
John


All times are GMT +1. The time now is 12:48 PM.

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