Guest User

Untitled

a guest
Feb 18th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Dim varTestVal4 As Variant
  2. Dim intRowCount4 As Integer
  3. Dim intAdjustment4 As Integer
  4.  
  5. ActiveSheet.Range("D1").Select
  6. While Selection.Offset(1, 0).Value <> ""
  7. intRowCount4 = 1
  8. varTestVal4 = Selection.Value
  9. While Selection.Offset(1, 0).Value = varTestVal4
  10. intRowCount4 = intRowCount4 + 1
  11. Selection.Offset(1, 0).Select
  12. Selection.ClearContents
  13. Wend
  14. intAdjustment4 = (intRowCount4 * -1) + 1
  15. Selection.Offset(intAdjustment4, 0).Select
  16. Selection.Resize(intRowCount4, 1).Select
  17. With Selection
  18. .Merge
  19. .HorizontalAlignment = xlCenter
  20. .VerticalAlignment = xlCenter
  21. End With
  22. Selection.Offset(1, 0).Resize(1, 1).Select
  23.  
  24. Wend
Add Comment
Please, Sign In to add comment