multi-column data consolidation

P

pronto

Hi guys, here is my problem....

Scenario:

- Column A to F are months (Jan to June)
- Beneath each month (starting row 2 downwards), text data will b
entered.

Question:

How can I have the six months add up or compiled as a single colum
database in another sheet or a separate column in that same sheet?
will be adding data every so often under these months and it shoul
update the database.

Thank you for any assistance/help
 
B

Bernard Liengme

Question is not clear to me.
Not sure what 'add up or compile' means with text entries
Perhaps, in G2 enter =A2&B2&C2 and copy down to row 1000
If numbers, to sum EVERYTHING use =SUM(A:A, B:B, C:C)
 
I

icestationzbra

currently this piece works for a range of cells from A2 to C4. th
values are added in column F from F2 onwards. it is assumed that th
first row will contain header information. put this piece in th
particular sheet's code module. there is one glitch, if you enter
value in on of the cells in A2:C4, as soon as you tab out, it will b
added in column F. however, if you go back and delete it, it will stil
show up there AND the new value will also show up there. i have not bee
able to find a way to counter that.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

Dim rngDB As Range
Dim rngCell As Range
Dim i As Integer
Dim flag As Boolean

If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("A2:C4")) Is Nothing Then Exit Sub

i = Sheet1.Range("f1").CurrentRegion.Rows.Count

If i < 2 Then

Sheet1.Range("f2").Value = Sheet1.Range("a2").Value
Exit Sub

End If

Set rngDB = Range("f2:f" & i)

For Each rngCell In rngDB

If Target.Value = rngCell.Value Then

flag = False
Exit For

Else

flag = True

End If

Next rngCell

If flag = True Then

Range("f1").End(xlDown).Offset(1, 0).Value = Target.Value

End If

End Su
 
Top