Results 1 to 3 of 3

Thread: to get one complete vba code from gathering vba codes and formulla

  1. #1
    Junior Member saied's Avatar
    Join Date
    Jan 2015
    Posts
    5
    Rep Power
    0

    to get one complete vba code from gathering vba codes and formulla

    steps13-15.zipsteps10-12.zipsteps7-9.zipsteps4-6.zipsteps1-3.zip
    hi i work with a large amount of data and i use all these steps above so please see these jpg's and help me to access the result easily with one code if its possible and i send jpgs because my english language is not very well i wish pictures show what i want to say thanks
    with best wishes
    i think jpgs arent efficient so i explain it more
    step 1 jpg shows my column data
    step 2 jpg shows the code to devide in to 60 { (because of 60 minutes) to reach one hour data}
    step 3 &4 jpg show the result of code & first row from B1
    5 &6 jpgs show the transpose of this first row from B1
    step 7 jpg shows the code to devide in to 12
    step 8 jpg shows the result of code
    step 9 & 10 & 11 jpgs show copy of selecting B1 to ?12 and transpose them
    step 12 &13 jpg shows changing to cm
    step 14 jpg shows format cell number and decimal places to 0
    step 15 jpg shows a formulla =text(A1;"000") to represent 3 digit


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=bRd4mJglWiM&lc=UgxRmh2gFhpmHNnPemR4AaABAg
    https://eileenslounge.com/viewtopic.php?p=316705#p316705
    https://eileenslounge.com/viewtopic.php?p=316704#p316704
    https://eileenslounge.com/viewtopic.php?f=27&t=40919&p=316597#p316597
    https://eileenslounge.com/viewtopic.php?p=316412#p316412
    https://eileenslounge.com/viewtopic.php?p=316254#p316254
    https://eileenslounge.com/viewtopic.php?p=316280#p316280
    https://eileenslounge.com/viewtopic.php?p=315915#p315915
    https://eileenslounge.com/viewtopic.php?p=315512#p315512
    https://eileenslounge.com/viewtopic.php?p=315744#p315744
    https://www.eileenslounge.com/viewtopic.php?p=315512#p315512
    https://eileenslounge.com/viewtopic.php?p=315680#p315680
    https://eileenslounge.com/viewtopic.php?p=315743#p315743
    https://www.eileenslounge.com/viewtopic.php?p=315326#p315326
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40752
    https://eileenslounge.com/viewtopic.php?p=314950#p314950
    https://www.eileenslounge.com/viewtopic.php?p=314940#p314940
    https://www.eileenslounge.com/viewtopic.php?p=314926#p314926
    https://www.eileenslounge.com/viewtopic.php?p=314920#p314920
    https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837
    https://www.eileenslounge.com/viewtopic.php?f=21&t=40701&p=314836#p314836
    https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314621#p314621
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 04-24-2024 at 07:50 PM. Reason: no answer

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Post a sample workbook with expected result.
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Member p45cal's Avatar
    Join Date
    Oct 2013
    Posts
    94
    Rep Power
    12
    run blah while the source sheet is the active sheet.
    Code:
    Sub blah()
    D
    Range(Range("B1"), Range("B1").End(xlToRight)).Copy
    'Range("B1:MZ1").copy
    Sheets.Add After:=Sheets(Sheets.Count)
    Selection.PasteSpecial Transpose:=True
    D2
    Range(Range("B1:B12"), Range("B1:B12").End(xlToRight)).Copy
    'Range("B1:AF12").copy
    Sheets.Add After:=Sheets(Sheets.Count)
    Selection.PasteSpecial Transpose:=True
    End Sub
    
    Sub D()
    Dim X As Long, LastRow As Long, vArrIn As Variant, vArrOut As Variant
    LastRow = Cells(Rows.Count, "A").End(xlUp).Row
    vArrIn = Range("A1:A" & LastRow)
    ReDim vArrOut(1 To 60, 1 To Int(LastRow / 60) + 1)
    For X = 0 To LastRow - 1
      vArrOut(1 + (X Mod 60), 1 + Int(X / 60)) = vArrIn(X + 1, 1)
    Next
    Range("B1").Resize(60, UBound(vArrOut, 2)) = vArrOut
    End Sub
    
    Sub D2()
    Dim X As Long, LastRow As Long, vArrIn As Variant, vArrOut As Variant
    LastRow = Cells(Rows.Count, "A").End(xlUp).Row
    vArrIn = Range("A1:A" & LastRow)
    ReDim vArrOut(1 To 12, 1 To Int(LastRow / 12) + 1)
    For X = 0 To LastRow - 1
      vArrOut(1 + (X Mod 12), 1 + Int(X / 12)) = vArrIn(X + 1, 1) * 100
    Next
    With Range("B1").Resize(12, UBound(vArrOut, 2))
      .Value = vArrOut
      .NumberFormat = "0"
    End With
    End Sub

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 06-11-2023 at 03:30 PM.

Similar Threads

  1. Replies: 1
    Last Post: 08-23-2013, 06:33 PM
  2. Shorten VBA Code By Removing Redundant Superfluous Code
    By paul_pearson in forum Excel Help
    Replies: 2
    Last Post: 08-15-2013, 09:09 PM
  3. Replies: 0
    Last Post: 07-24-2013, 11:20 PM
  4. Auto Complete for Data Validation
    By IJC in forum Excel Help
    Replies: 1
    Last Post: 05-15-2013, 09:30 AM
  5. Replies: 22
    Last Post: 03-19-2013, 07:57 AM

Posting Permissions

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