insert 'x' number of rows in excel

Hi,
I'm looking to insert 'x' no. of rows into an excel document where 'x' is 
the result of a 'countA' function.

Is this possible?
0
Al-Blakie (1)
8/9/2004 10:33:05 AM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
827 Views

Similar Articles

[PageSpeed] 13

Hi#
only possible with VBA. Would this be feasible for you?

>-----Original Message-----
>Hi,
>I'm looking to insert 'x' no. of rows into an excel 
document where 'x' is 
>the result of a 'countA' function.
>
>Is this possible?
>.
>
0
frank.kabel (11126)
8/9/2004 11:16:21 AM
Yes VBA is feasible

"Frank Kabel" wrote:

> Hi#
> only possible with VBA. Would this be feasible for you?
> 
> >-----Original Message-----
> >Hi,
> >I'm looking to insert 'x' no. of rows into an excel 
> document where 'x' is 
> >the result of a 'countA' function.
> >
> >Is this possible?
> >.
> >
> 
0
AlBlakie (6)
8/9/2004 11:27:06 AM
How about:

Option Explicit
Sub testme()

    Dim numOfRows As Long
    Dim myRow As Long
    
    myRow = 8 'or whereever you want it
    With ActiveSheet
        numOfRows = Application.CountA(.Range("a1:a3"))
        If numOfRows > 0 Then
            .Rows(myRow).Resize(numOfRows).Insert
        End If
    End With
        
End Sub




Al-Blakie wrote:
> 
> Yes VBA is feasible
> 
> "Frank Kabel" wrote:
> 
> > Hi#
> > only possible with VBA. Would this be feasible for you?
> >
> > >-----Original Message-----
> > >Hi,
> > >I'm looking to insert 'x' no. of rows into an excel
> > document where 'x' is
> > >the result of a 'countA' function.
> > >
> > >Is this possible?
> > >.
> > >
> >

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
8/9/2004 10:30:08 PM
Reply:

Similar Artilces:

Linking a Column List to a Row List #2
Thanks for the help, it worked perfectly -- Mo ----------------------------------------------------------------------- Moe's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1250 View this thread: http://www.excelforum.com/showthread.php?threadid=27428 ...

Mail merge with Excel in Publisher 200
Whenever I open a merged document in Publisher with I merged with an Excel spreadsheet, I must re-establish my link with the spreadsheet (including any filters I originally set)--quite annoying. This is has not always been the case; I have some connections which have stayed connected. These could possibly be ones I did in an earlier version of Publisher. Is this a problem with just Publisher 2000 or is there a way to permanently connect my publisher document with my Excel spreadsheet? Thanks much! ...

How do I insert Roman Numerals?
New to Word 2007 would someone please explain to me how to insert Roman Numerlas in my document? "ckj" <ckj@discussions.microsoft.com> wrote in message news:6CF0C580-BA6E-463D-B4FD-E6A6FDD9E814@microsoft.com... > New to Word 2007 would someone please explain to me how to insert Roman > Numerlas in my document? Just type them... I II III IV V VI VII VIII IX X XI etc etc. Type a number e.g. 21, select it and run the following macro Dim oRng As Range Set oRng = Selection.Range oRng.Fields.Add oRng, 34, oRng.Text & " \*Roman"...

Problem while converting excel to csv for Special Characters
Hi All, I need to convert excel sheet data into csv format data=20 file, but while doing so for some Eastern countries, like=20 Poland, special characters in the excel sheet are getting=20 converted into junk data e.g Excel Sheet Original line - Zesp=F3l Opieki Zdrowotnej w=20 Bedzinie Line when converted to CSV - Zesp=F3? Opieki Zdrowotnej w B? dzinie Really appreciate your response on this. Thanks, Pramod I'm not sure if this will help, but I just copied your first original line into a excel worksheet (USA xl2002) and saved it as .csv. I re-imported and it looked fine. I opened t...

Showing a date field as a number
Hi. I was wondering if there was any way that I could have a column showing the date and time (20/12/2007 06:00:00) and another column show the date and time as a number, (29548). This would be done in a select query, but I am not sure how? Is it possible? Regards AJ AJ, Use format... mm/dd/yy hh:nn:ss for 20/12/2007 06:00:00 Use format... #.0000 (with Decimal Places = to suit your needs) for 39436.2500 Use format... # (with Decimal Places = 0) for 39436 -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccs...

How To Copy Rows without Work Art
I have some Word Art in say Rows 9-23, I use some Macro code to copy cells 9-23 down to 10 grouped rows below 23, but everytime I run the Macro it also copies a 'New' Work Art over the existing Art below Row 15. My fear is that my file size will balloon. My code simply states Sheets("Starters").Select Rows("9:23").Select Selection.Copy Range("A25").Select ActiveSheet.Paste Range("A41").Select ActiveSheet.Paste How can I copy Rows 9-23 without the WorkArt also (which is 'floating' over Rows 14-18) Thanks Anot...

Insert trigger
Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? If trigger is the way to go, what is the syntax to create the after insert trigger? Thanks in advance. You can create a default constraint on the table set to CURRENT_TIMESTAMP. That will handle the automatic date assignment without any need for coding. -...

inserting hrs and minutes
I have a cell in my time card that displays total weekly time -ex- "40:15" is there a way to make it more like this...40hrs,15mins -- Message posted from http://www.ExcelForum.com Use a custom format hh"hrs",mm"mins" -- Regards, Peo Sjoblom "-Brian-H- >" <<Brian-H-.110wgs@excelforum-nospam.com> wrote in message news:Brian-H-.110wgs@excelforum-nospam.com... > I have a cell in my time card that displays total weekly time -ex- > "40:15" is there a way to make it more like this...40hrs,15mins ? > > > ...

insert an interactive excel file into word web page
I'm trying to insert a excel file into a word document with text, and then save it was as a web page, but I want to keep the excel part interactive. Any ideas? ...

What about routing numbers when printing checks
I had bought a pack of versacheck refills, which are compatable with money, and was looking forward to printing my checks at home. Well after setup, i went to print a few checks. The checks orinted fine and within margins, but i notice that there arent any routing numbers, my name or address, or anything on it to make this a valid and redeemable check. Am i missing something?? I have MS money 2003 and am runnning XP. On Fri, 29 Aug 2003 01:33:55 -0700, "MGidish" <MGidish@cox-internet.com> wrote: >I had bought a pack of versacheck refills, which are >compatable ...

Recolor embeded Excel graph in PowerPoint
Is there any way to recolor an embeded Excel graph colors to match the color scheme of targeted PowerPoint file? thanks. You could create a user-defined custom chart type with the colour schem of the presentation and apply it to the embedded chart. I am not aware of any in-built color synchronization between powerpoin and excel, though. - Leni -- Message posted from http://www.ExcelForum.com when you say "A user-defined custom chart type" Is this "Chart>Chart type>Custom types>User-defined" ? If yes. 1. Create the same type of graph with MS Graph. 2. Add...

Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet
re: "Outlook2003, File-Insert-Options" On making new-email with Attachment-File(s), ** File Menu | Insert | File >>> (Brows and select File to insert ) then we can see the button "Insert", and write side Drop Down Arrow lower-right side of Dialog Box; If it clicked, we can see three options as follows: ** Insert Insert as text Insert as Attachment I can not recognize/understand the difference between "Insert" and "Insert as Attachment" *** What is the difference between Insert and Insert As Attachment ? I would appreciate y...

Colour numbers within my formulae
I have been playing around with the '&' function, allowing me to mix text with calculations and cell references. I have the following at the moment: ="Of the "&TEXT(J954,"�#,0.00")&" made this year, I have managed to save "&TEXT(100/J954*J955, "#,#0.0")&"%" Which gives me a cell displaying the following: Of the �0.00 made this year, I have managed to save 0.0% What I would like to do is show the numbers (�0.00; 0.0%) in the colour blue. I don't want to add conditional formatting, just apply a colour so t...

Inserting Hyperlinks in a Protected Sheet
Hi I run Excel 2000 and I have a protected worksheet that I share wit users in my organisation. I want to allow the insertion of a hyperlin to a specific file type within a specified directory on our server. 3 Questions: 1.Protection on disables the insert hyperlink command. Can this b overcome with worksheet activate code? 2.Can I limit the types of files (preferably by requiring the file t meet a mask format eg "z-*.xls")? 3.Can I limit the directory that can be linked, by referring to pathname stored in a cell on the active sheet? Would appreciate your suggestions. Thanks S...

same month/day on x axis for multiple years
If i have data sourced to me like this: Date Price 1 Price 2 Price 3 1/1/2003 2.5 3.2 3.0 1/2/2003 2.6 2.8 2.9 1/1/2004 2.7 3.0 3.1 1/2/2004 2.0 2.8 3.2 1/1/2005 6.0 6.2 6.2 1/2/2005 6.5 6.3 6.4 If I want a line graph with the 3 series related to the Price columns, how can I get the x axis to only reflect the 3 month/day combinations not including the year? When I try this it gives me 6 x axis points for each series. Thanks, Mike...

Exporting Excel Charts in Separate Tabs
I have an excel file with different charts on each tab. The Excel file has at least 20 tabs and I would like to export them into Word as a separate sheet per tab for a reference guide. Is there a way to export from excel without having to cut and paste each tab? I am using MS Office 2003. ...

Insert with a where condition
Hi, sql 2005 I have an insert statement that is ignoring the where condition. That is, I want to insert records when they do not already exist in the destination table. INSERT INTO dbo.tblmnuGroupPerm ( gId ,mtfID ,... ) SELECT @gID ,mtfID ,... FROM dbo.locmnuTabFunction AS ltf WHERE ltf.mtfID NOT IN ( SELECT gp.mtfID FROM dbo.tblmnuGroupPerm AS gp WHERE gp.gId=@gID AND gp.Deleted=0 ) Any ideas or recommendations appreciated :-) Many thanks, Jonathan It's OK... <oops "redFace">I did not correctly se...

Insert
I want to overtype in a Publisher text box. I find I can only insert. The "insert" key doesn't do anything. ...

Auto Sum unknown number of rows
Im using odbc to import data from a database. Imported is a list of products in column A and then various columns containing sales figures. Because of the import from the database, I do not know how many rows of products will appear, this week we sell 500 different products, next week 550. I need to add totals to the columns directly under the last product. I've tried creating the totals in an empty template and then inserting the imported data so the total figures move down and appear at the bottom. However the imported data moves the total cells to the right instead of down. Tried ...

embed x.s sheet to HTmL page
Hi, I have a file called Bonds.xls located on my C drive in a flode called Support. I want to insert this file to a HTML pae. I trie embed, object and everything I could find but i cant get it to insert I am using office and OS wkin200. Can anybody give me some help? I dont know if I am using tags wrong o just wrong tags. thank -- Message posted from http://www.ExcelForum.com Have you tried saving the worksheet in html format? You can incorporate this html code into the web page. - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ ...

My columns are numbers too!!!
My comulmns are not letters anymore....they are numbers. What did I do, and how can I change it back? Richard Go to Tools / Options / General and uncheck R1/C1 reference style Andy. "Richard G" <anonymous@discussions.microsoft.com> wrote in message news:73f501c4020b$28d0b9c0$a101280a@phx.gbl... > My comulmns are not letters anymore....they are numbers. > What did I do, and how can I change it back? Andy, Thanks. That was driving me crazy! Richard >-----Original Message----- >Richard > >Go to Tools / Options / General and uncheck R1/C1 reference ...

excel data to outlook
Hi, In my daily job, I need to flash some new data into my excel and use the excel result to send out mails to report daily result. Is all numbers I need to report in mails. Wonder if you can tell me if there is any tools to make the data into text on my outllook. I tried forming some string using: ="Today we booked "&Sheet1!A4&" MM vs."&Sheet1!A5&" MM expiry" but when I copied this cells into my outlook, format is rare and pasted as table / cells where I prefer to paste as text format ( which can be read by boss with blackberry). I asked ar...

how to insert data in a table
Hi Exprets; I am creating an access database in which I want to insert data in already created table. Kindly help. Regards, Vikky Vikky <love.excel@gmail.com> wrote in news:1194124711.012302.269990 @e34g2000pro.googlegroups.com: > Hi Exprets; > > I am creating an access database in which I want to insert data in > already created table. > > Kindly help. > > Regards, > > Vikky > Data from where? Do you want to import it from excel, from a text file, copy it from another table or type it in manually? -- Bob Quintal PA is y I've altere...

financial excel formula
Trying to use excel to determine the % return on a stock from the tim you purchase until you sell, adjusted for time. ie., key in Pv o money today; input Fv or (the selling price); enter the amount of tim expressed in months or years (N); calc the rate of return %? p $50.00 FV $74.00 N 3 years % return =??? using a texas instruments ba-35 calculator th answer is 13.96%. Can't get this out of excel, any suggestions -- Message posted from http://www.ExcelForum.com =RATE(3;0;-50;74) The financial function follow the rule that incoming and outgoing money are different in sign. Hence...

In Excel: If I know a file has 147,000 records, but Excel will on.
In Excel: If I know a file has 147,000 records, but Excel will only load 65,000, how do I get to the rest of the file? MVP Chip Pearson's website has some code that may help you out: http://www.cpearson.com/excel/imptext.htm HTH Jason Atlanta, GA >-----Original Message----- >In Excel: If I know a file has 147,000 records, but Excel will only load >65,000, how do I get to the rest of the file? >. > > attached a VBS script that I wrote to do that. Was unable to save it, Jim .. Could you paste it in the message itself ? Thanks -- Rgds Max xl 97 --- GMT+8, 1� 22...