> I put the first transaction on the row after the category on sheet2. try
> this with no data on sheet2 except for the rows with the categories. I csan
[quoted text clipped - 109 lines]
> > > >
> > > > Burton
In VBA you have to insert a module and put the code in a module page. From
the VBA menu go to insert menu and add module.
> Where di I put this code on sheet 2?
>
[quoted text clipped - 111 lines]
> > > > >
> > > > > Burton
Burton - 28 Apr 2008 15:28 GMT
I think I got it working it looks good I will play with the tallied
forcasted ammount and see if I can get it working. Thanks for all of your
help you really saved me.
Burton
> In VBA you have to insert a module and put the code in a module page. From
> the VBA menu go to insert menu and add module.
[quoted text clipped - 114 lines]
> > > > > >
> > > > > > Burton
Burton - 28 Apr 2008 15:39 GMT
ok, well it worked, but when I ran the macro a second time it created
duplicates is there a simple way for the macro to sort the data and if ALL
fields match in that sorted category then it won't print it. If the entery is
a new entery then it will print on the next avalible row? Once again I
really appreciate all the help that you have given me with this page.
> In VBA you have to insert a module and put the code in a module page. From
> the VBA menu go to insert menu and add module.
[quoted text clipped - 114 lines]
> > > > > >
> > > > > > Burton
Burton - 28 Apr 2008 16:00 GMT
I hate to be a pest, but you asked where the forcasted amount will be and I
see that you need to bring this in with VBA also. Sheet 4 hasn't been built
yet, but I will copy the forcasted amount from "sheet4" to the same row as
the category in cloumn F. As a entery is made I would like the amount spent
to subtract from the aloted amount at the bottom of the tallied amount I
would like to know how much there is left before I go over budget in that
area. I know that I am asking a lot from you, but you are a big help. Once
again thanks for all you have done
> In VBA you have to insert a module and put the code in a module page. From
> the VBA menu go to insert menu and add module.
[quoted text clipped - 114 lines]
> > > > > >
> > > > > > Burton
Joel - 28 Apr 2008 17:15 GMT
I made the balance a formula in column F. also made some changes where rows
were added on sheet2. See code below.
Sub move_data()
With Sheets("Sheet1")
RowCount = 2
Do While .Range("A" & RowCount) <> ""
Trans_Date = .Range("A" & RowCount)
Trans = .Range("B" & RowCount)
Category = .Range("C" & RowCount)
Amount = .Range("D" & RowCount)
With Sheets("Sheet2")
Set c = .Columns("B:B").Find(what:=Category, _
LookIn:=xlValues, lookat:=xlWhole)
If c Is Nothing Then
MsgBox ("Could not find categroy = " & Category)
Exit Sub
Else
'look if there is data in column c
If c.Offset(1, 1) = "" Then
Data_Row = c.Row + 1
Else
If c.Offset(2, 1) = "" Then
Data_Row = c.Row + 2
Else
Data_Row = c.Offset(1, 1).End(xlDown).Row
Data_Row = Data_Row + 1
End If
End If
.Rows(Data_Row).Insert
.Range("C" & Data_Row) = Trans_Date
.Range("D" & Data_Row) = Trans
.Range("E" & Data_Row) = Amount
.Range("F" & Data_Row).Formula = _
"=F" & (Data_Row - 1) & "-E" & Data_Row
End If
End With
RowCount = RowCount + 1
Loop
End With
End Sub
> In VBA you have to insert a module and put the code in a module page. From
> the VBA menu go to insert menu and add module.
[quoted text clipped - 114 lines]
> > > > > >
> > > > > > Burton