Results 1 to 9 of 9

Values of cells to be routed to other sheet

Threaded View

laansesu Values of cells to be routed... 12-31-2015, 06:06 AM
laansesu Re: Values of cells to be... 01-02-2016, 02:48 AM
LeoTaxi Re: Values of cells to be... 01-02-2016, 02:49 PM
laansesu Re: Values of cells to be... 01-03-2016, 03:06 AM
LeoTaxi Re: Values of cells to be... 01-03-2016, 04:38 PM
laansesu Re: Values of cells to be... 01-05-2016, 01:58 AM
laansesu Re: Values of cells to be... 01-12-2016, 06:19 AM
LeoTaxi Re: Values of cells to be... 01-12-2016, 08:04 AM
laansesu Re: Values of cells to be... 01-13-2016, 04:49 AM
  1. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Values of cells to be routed to other sheet

    1 try

    this in sheet_change

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$G$9" Or Target.Address = "$G$8" Then
        my_loc = Range("G8")
        my_disp = Range("G9")
        With Sheets("SSR")
            lcol = .UsedRange.Columns.Count
            For x = 2 To lcol
                If .Cells(5, x) = my_loc And .Cells(6, x) = my_disp Then
                    my_col = x
                    Exit For
                End If
            Next
            .Range(.Cells(8, my_col), .Cells(42, my_col)).Copy
        End With
        With Sheets("sheet1").Range("H14")
            .PasteSpecial Paste:=xlValues
        End With
    End If
    End Sub
    this in quantity add

    Sub Macro1()
        my_loc = Range("G8")
        my_disp = Range("G9")
        With Sheets("SSR")
            lcol = .UsedRange.Columns.Count
            For x = 2 To lcol
                If .Cells(5, x) = my_loc And .Cells(6, x) = my_disp Then
                    my_col = x
                    Exit For
                End If
            Next
        End With
        For Each cl In Range("H14", "H48")
            cl.Value = cl.Value + cl.Offset(, -1).Value
        Next
        Range("H14", "H48").Copy
        With Sheets("SSR").Cells(8, my_col)
            .PasteSpecial Paste:=xlValues
        End With
        Range("G14", "H48").ClearContents
    End Sub
    made also 2 named ranges for region and dispatch on extra sheet (blad1)

    Kind regards
    Leo
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Values to be routed from one sheet to other sheets
    By laansesu in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-12-2015, 06:19 AM
  2. Sending Routed Worksheet as a 1993-2003 Doc
    By walke145 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2014, 11:01 AM
  3. Replies: 2
    Last Post: 11-21-2013, 10:01 AM
  4. Replies: 1
    Last Post: 04-11-2013, 01:02 PM
  5. Replies: 5
    Last Post: 02-21-2013, 07:17 PM
  6. Change Routing Message in Outlook when Excel File is Routed
    By Mike R. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2005, 12:45 PM

Tags for this Thread

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