LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default plz help...simple stuff


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple stuff (Probably) ChrisMattock Excel Worksheet Functions 6 June 20th 06 08:44 PM
Simple Excel Formula Help robert145 New Users to Excel 7 March 17th 06 04:32 PM
Simple, but not for me...help TKinHawaii Excel Worksheet Functions 9 December 29th 05 12:32 AM
Simple Formula (I thought) csandi Excel Worksheet Functions 3 November 14th 05 08:47 PM
Help with what should be a simple formula B Millar via OfficeKB.com Excel Worksheet Functions 2 June 16th 05 04:18 PM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"