#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default Consolidating data

Sent OP this

Option Explicit
Sub SAS_MakeTable()
Dim lr As Long
Dim c As Range
Dim mm As Double
Dim mr As Long
Dim mc As Double

Application.ScreenUpdating = False

lr = Cells(Rows.Count, "b").End(xlUp).Row
Range("f3:r" & lr).ClearContents

Range("B2:B" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("F2"), Unique:=True

For Each c In Range("b4:b" & lr)
mm = Month(c.Offset(, 1))
mr = Columns(6).Find(What:=c, LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext).Row
'MsgBox mr
mc = Rows(2).Find(What:=mm, LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByColumns, SearchDirection:=xlNext).Column
'MsgBox mc
Cells(mr, mc) = Cells(mr, mc) + c.Offset(, 2)
Next c
Application.ScreenUpdating = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message news:...
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"BDT" wrote in message
...
Hi,

I need to consolidate some lines of data in a 19K line spreadsheet and
then
change its basic format.

I have 3 columns of data: ID# | date | volume

My problem is that while the data is mostly monthly, there are some
months
with two entries and I need to consolidate them into a single monthly
value.
I don't care which of the dates is used as long as the month and year are
correct. That's the 'consolidate' part.

Then I need to convert the 19,000 row spreadsheet to a big grid with the
meters listed in the left row and the month/year at the top of each
column
with the appropriate volumes in the body of the table. This is the
'format'
part and I suspect that I can use Access to do this, but I thought I
would
ask for input here, too.

thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consolidating Data Steve Excel Discussion (Misc queries) 1 May 28th 10 03:14 PM
Consolidating Data Sisell Excel Worksheet Functions 1 February 17th 09 03:18 AM
consolidating data potman Excel Discussion (Misc queries) 3 July 30th 08 03:43 AM
Consolidating Data Gator Excel Worksheet Functions 4 September 20th 07 04:28 PM
Consolidating data?? Louise Excel Worksheet Functions 2 November 8th 05 01:40 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"