+ Reply to Thread
Results 1 to 8 of 8

need help with formula... please

Hybrid View

  1. #1
    Registered User
    Join Date
    06-15-2006
    Posts
    35

    Smile need help with formula... please

    Sheet1
    column A:
    Date
    Mon/04/2006
    Tue/05/2006
    Wed/06/2006
    Thu/07/2006
    Fri/08/2006

    column B:
    total $ amount
    $54,403.45
    $73,648.33
    $55,874.21
    $60,030.05
    $104,275.63

    Sheet2
    column A:
    total dollar value of an order

    column B:
    the date of an order when it was processed


    OKAY.... this is what i need, please.... sheet1 is already filled for the week. in sheet2 i would like to enter the date of an order when it was processed and the total amount dollar value of that order. i would like the total amount of the order to add to sheet1 (total $ amount) with the corresponding date.

    hope i explained it right...

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Think this link will help

    http://www.rondebruin.nl/copy1.htm#range1

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    06-15-2006
    Posts
    35
    okay i'm a dummy... i am totally lost... please help in details, i don't even witch one to try...

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try this

    VBA Noob
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-15-2006
    Posts
    35
    can you make it that when you transfer to Sheet1 that the amount will be added on to the specific date.

    example.
    on sheet2 i will enter say mondays date and an amount. when i click the transfer button it will automatically add the amount with mondays total. and is it possible for the data on sheet2 to not dissapear?

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    To stop it clearing remove this line of code

    sourceRange.Clear
    To Sort just record the action and add to code

    Sub copy_1_Values_ValueProperty()
        Dim sourceRange As Range
        Dim destrange As Range
        Dim Lr As Long
        Lr = LastRow(Sheets("Sheet1")) + 1
        Set sourceRange = Sheets("Sheet2").Range("A2:b2")
        With sourceRange
            Set destrange = Sheets("Sheet1").Range("A" & Lr). _
                            Resize(.Rows.Count, .Columns.Count)
        End With
        destrange.Value = sourceRange.Value
        Sheets("Sheet1").Activate
        Columns("A:B").Select
        Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
            OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
            DataOption1:=xlSortNormal
        Range("A1").Select
       
    End Sub
    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1