View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] lhkittle@comcast.net is offline
external usenet poster
 
Posts: 168
Default 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