Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default Help with the formula to insert cells

Hi,

Below is my question,

I need to have 2 rows inserted for each cell I have in column "A".

Serial # RESULTS
5877-0101-6090 5877-0101-6090
5886-0101-6090
5885-0101-6090
5886-0101-6090


5885-0101-6090

Help with the formula.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Help with the formula to insert cells

With datalist in Column A of Sheet1, say you want to create this "expanded"
list in Column B (or *any* other column) on another sheet.

Enter this formula in first cell of the *new* location:

=INDEX(Sheet1!A:A,ROWS($1:3)/3)

NOW, select the formula cell *AND* the next 2 *empty* cells (select -
*don't* drag to copy the formula).

Click on the fill handle of this *3 cell* selection (1 formula cell and 2
empty cells), and drag down to copy as needed.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Igneshwara reddy" wrote in
message ...
Hi,

Below is my question,

I need to have 2 rows inserted for each cell I have in column "A".

Serial # RESULTS
5877-0101-6090 5877-0101-6090
5886-0101-6090
5885-0101-6090
5886-0101-6090


5885-0101-6090

Help with the formula.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Help with the formula to insert cells



"RagDyeR" wrote:

With datalist in Column A of Sheet1, say you want to create this "expanded"
list in Column B (or *any* other column) on another sheet.

Enter this formula in first cell of the *new* location:

=INDEX(Sheet1!A:A,ROWS($1:3)/3)

NOW, select the formula cell *AND* the next 2 *empty* cells (select -
*don't* drag to copy the formula).

Click on the fill handle of this *3 cell* selection (1 formula cell and 2
empty cells), and drag down to copy as needed.
--


Or you can use this macro

Sub InsertRows()
Application.ScreenUpdating = False
Range("A1").Select
nr = ActiveCell.CurrentRegion.Rows.Count
For i = nr To 3 Step -1
Cells(i, 1).EntireRow.Insert
Cells(i, 1).EntireRow.Insert
Next i
Application.ScreenUpdating = True
End Sub

Peter
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Help with the formula to insert cells

Is this the functions group?<bg
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Billy Liddel" wrote in message
...


"RagDyeR" wrote:

With datalist in Column A of Sheet1, say you want to create this
"expanded"
list in Column B (or *any* other column) on another sheet.

Enter this formula in first cell of the *new* location:

=INDEX(Sheet1!A:A,ROWS($1:3)/3)

NOW, select the formula cell *AND* the next 2 *empty* cells (select -
*don't* drag to copy the formula).

Click on the fill handle of this *3 cell* selection (1 formula cell and 2
empty cells), and drag down to copy as needed.
--


Or you can use this macro

Sub InsertRows()
Application.ScreenUpdating = False
Range("A1").Select
nr = ActiveCell.CurrentRegion.Rows.Count
For i = nr To 3 Step -1
Cells(i, 1).EntireRow.Insert
Cells(i, 1).EntireRow.Insert
Next i
Application.ScreenUpdating = True
End Sub

Peter


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default Help with the formula to insert cells



"RagDyeR" wrote:

Is this the functions group?<bg
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Billy Liddel" wrote in message
...


"RagDyeR" wrote:

With datalist in Column A of Sheet1, say you want to create this
"expanded"
list in Column B (or *any* other column) on another sheet.

Enter this formula in first cell of the *new* location:

=INDEX(Sheet1!A:A,ROWS($1:3)/3)

NOW, select the formula cell *AND* the next 2 *empty* cells (select -
*don't* drag to copy the formula).

Click on the fill handle of this *3 cell* selection (1 formula cell and 2
empty cells), and drag down to copy as needed.
--


Or you can use this macro

Sub InsertRows()
Application.ScreenUpdating = False
Range("A1").Select
nr = ActiveCell.CurrentRegion.Rows.Count
For i = nr To 3 Step -1
Cells(i, 1).EntireRow.Insert
Cells(i, 1).EntireRow.Insert
Next i
Application.ScreenUpdating = True
End Sub

Peter





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default Help with the formula to insert cells

Hi,

Your forumla is very good to work.

Can I use this forumla with "IF" condition.

For Ex: If cell A1 contains 5886N, in this cell there is an alphabet which
contains and I need to input 4 lines and if it is without alphabet it should
input 3 lines.

I know to sort this and use the function, but very eager to know whether
this will work in the forumla only.

"RagDyeR" wrote:

Is this the functions group?<bg
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Billy Liddel" wrote in message
...


"RagDyeR" wrote:

With datalist in Column A of Sheet1, say you want to create this
"expanded"
list in Column B (or *any* other column) on another sheet.

Enter this formula in first cell of the *new* location:

=INDEX(Sheet1!A:A,ROWS($1:3)/3)

NOW, select the formula cell *AND* the next 2 *empty* cells (select -
*don't* drag to copy the formula).

Click on the fill handle of this *3 cell* selection (1 formula cell and 2
empty cells), and drag down to copy as needed.
--


Or you can use this macro

Sub InsertRows()
Application.ScreenUpdating = False
Range("A1").Select
nr = ActiveCell.CurrentRegion.Rows.Count
For i = nr To 3 Step -1
Cells(i, 1).EntireRow.Insert
Cells(i, 1).EntireRow.Insert
Next i
Application.ScreenUpdating = True
End Sub

Peter



Reply
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
Can't insert cells kramer31 Excel Discussion (Misc queries) 2 March 6th 07 10:59 PM
Insert Footer into Cells Lonewolf Excel Worksheet Functions 1 August 18th 06 12:41 AM
shortcut to insert cells salisshe Excel Worksheet Functions 3 May 16th 06 03:49 AM
What happened to Insert Cut Cells? Johnny Naperville Excel Discussion (Misc queries) 3 November 8th 05 06:17 PM
Insert Formula and Copy to other cells [email protected] Excel Discussion (Misc queries) 1 August 12th 05 08:51 PM


All times are GMT +1. The time now is 08:49 PM.

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"