Sub NormalizeData() ' Not very good, perhaps look to replace Dim Rng As Range Dim ws As Worksheet On Error Resume Next Set Rng = Application.InputBox(Prompt:="Select a range to normalize data" _ , Title:="Select a range", Default:=ActiveCell.Address, Type:=8) On Error GoTo 0 If Rng Is Nothing Then Else Application.ScreenUpdating = False Set ws = Sheets.Add i = 0 For r = 1 To Rng.Rows.Count - 1 For c = 1 To Rng.Columns.Count - 1 ws.Range("A1").Offset(i, 0) = Rng.Offset(0, c).Value ws.Range("A1").Offset(i, 1) = Rng.Offset(r, 0).Value ws.Range("A1").Offset(i, 2) = Rng.Offset(r, c).Value i = i + 1 Next c Next r ws.Range("A:C").EntireColumn.AutoFit Application.ScreenUpdating = True End If End Sub
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter