Results 1 to 7 of 7

Format destination data

Threaded View

  1. #1
    Registered User
    Join Date
    04-27-2019
    Location
    Northern Ireland
    MS-Off Ver
    2019
    Posts
    62

    Format destination data

    First here is code currently being executed:

    Sub Transpose_PasteModified()
    
    Dim source As Worksheet
    Dim destination As Worksheet
    Dim emptyColumn As Long
    
    Set source = Sheets("Master")
    Set destination = Sheets("Log")
    
    
    'Data Source
    source.Range("D4:E1858").Copy
    'Gets Empty Column
    emptyColumn = destination.Cells(4, destination.Columns.Count).End(xlToLeft).Column
    Application.ScreenUpdating = False
    
        If IsEmpty(destination.Range("G4")) Then
            destination.Cells(4, 7).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        Else
            emptyColumn = emptyColumn + 1
            destination.Cells(4, emptyColumn).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
            destination.Cells(3, emptyColumn).Value = Format(Now, "dd:mm:yy hh:mm")
        End If
    Application.CutCopyMode = False
    source.Range("A1").Select
    Application.ScreenUpdating = True
    End Sub

    Originally the source was source.Range("D4:D1858").Copy

    Then I added colE E4:E1858

    The problem is colE is a percentage field, whereas colD is a numbers field.

    I am not quite sure how to go about formatting this additional field. Perhaps there is a different approach I should be taking.

    Any help would be most appreciated.

    Patrick
    Last edited by gotroots; 05-31-2020 at 12:45 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Export Data From one source to multiple destination"Destination not in the same format"
    By Ali Rashed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2017, 06:52 AM
  2. Replies: 2
    Last Post: 07-12-2016, 02:56 PM
  3. Problem with destination format paste
    By leafs4life22 in forum Excel General
    Replies: 9
    Last Post: 07-13-2013, 02:50 AM
  4. Replies: 0
    Last Post: 03-05-2013, 07:34 PM
  5. Get data from source workbook and paste to destination in change format
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2012, 01:47 AM
  6. AutoFill Destination but use cell format from cells above
    By excel0831 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-21-2012, 03:15 PM
  7. Format date in destination cell
    By Susan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-05-2006, 07:10 PM

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