Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Here you go. Code: -------------------- Sub Convert() Dim i As Integer Dim r As Long Dim s As Range Set s = Application.InputBox("Select range to be converted", "Range Selection", , , , , , 8) s.Select ActiveCell.Select For r = 1 To s.Rows.Count Range(Selection.Offset(1, 0), Selection.Offset(2, 0)).Insert Shift:=xlDown Select Case ActiveCell.Value Case 1 For i = 0 To 2 Selection.Offset(i, 0).Value = ActiveCell.Value + i Next i Selection.Offset(3, 0).Select Case 2 For i = 0 To 2 Selection.Offset(i, 0).Value = 4 + i Next i Selection.Offset(3, 0).Select Case 3 For i = 0 To 2 Selection.Offset(i, 0).Value = 7 + i Next i Selection.Offset(3, 0).Select Case 4 For i = 0 To 2 Selection.Offset(i, 0).Value = 10 + i Next i Selection.Offset(3, 0).Select Case Else Exit Sub End Select Next r End Sub -------------------- -- Excelenator ------------------------------------------------------------------------ Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768 View this thread: http://www.excelforum.com/showthread...hreadid=568146 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple stuff (Probably) | Excel Worksheet Functions | |||
Simple Excel Formula Help | New Users to Excel | |||
Simple, but not for me...help | Excel Worksheet Functions | |||
Simple Formula (I thought) | Excel Worksheet Functions | |||
Help with what should be a simple formula | Excel Worksheet Functions |