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
1022 Views

Similar Articles

[PageSpeed] 4

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:

Sorting by Color in Excel 2000
I want to sort text by color. I have a worksheet with some rows in black font and some in red. I need to group the rows in red font together. Is there anyway to sort by color? Thanks Hi see: http://www.cpearson.com/excel/SortByColor.htm not possible without VBA -- Regards Frank Kabel Frankfurt, Germany "Greg" <gregor1974@hotmail.com> schrieb im Newsbeitrag news:0ce901c4ac89$2be98dc0$a301280a@phx.gbl... > I want to sort text by color. I have a worksheet with > some rows in black font and some in red. I need to group > the rows in red font together. Is there anyw...

Incorrect formatting opening .csv file in Excel
When opening a database generated .csv file with the following data: "1","10E-024","1" Excel opens it incorrectly formatting the text as a scientific number: 1 1.0E-24 1 If I save the file as .txt, and open in excel using the import wizard, I can specify that the column should be text, and the item code 10E-024 appears correctly. However this is far from ideal, as it relies on a manual step and the file cannot be saved as .csv again - otherwise the same fault happens next time the file it opened. Is there a way of forcing Excel to open .csv files in raw da...

Excel #21
I have another question for this paper that I'm working on and I can't seem to find the answer to. I'm a new user for Excel and I know next to nothing about it. Any help you can give me would be great... The question is: "If you see a spreadsheet with row AND column headings as NUMBERS, what is the problem (if any!!)? Tools > Options > General tab > uncheck R1C1 reference style > OK "allybell1980" wrote: > I have another question for this paper that I'm working on and I can't seem > to find the answer to. I'm a new user for Excel...

Number Formatting #10
I have a user who's numbers in excel are defaulting to a decimal even if you format the cell for number zero decimal places. For example if she enters 15 it will enter .15. This happens on every excel document she opens and if you open the same documents on another PC they work fine. I have even tried to reinstall excel on the PC and it does not correct the Issue. Please help with suggestions. For a work around I have her entering 15. But that is an extra key stroke. Thanks go to Tools>Options>Edit and uncheck the option for Fixed Decimal Places "Shane" wrote: >...

Merging Excel Sheet with Excel Sheet (Just like in MS Word!)
Hi everyone, Purpose: create classroom roster between one Excel spreadsheet as data source and another excel sheet. I know how to use one excel spreadsheet as a data source to merge with another word document; however, by using this method, I found that the link between the files keep dropping from time to time, especially when the folder has been moved around. I'm thinking of creating the same layout of the Word document in another Excel spreadsheet and somehow "LINK" the data source and the other spreadsheet together, but I'm not sure how, or whether thi...

Push single contact field data into prepared excel workbook
I am new to macros but ameager to get some formulated to help run my small business. I have been trying to find some code which suits my requirement of pushing signgular fields from a contact into a pre-prepared excel book which is loaded with the next stage of macro-powered automation. I recieve enquiries both via email and by phone. I use my blackberry to save phone enquiries to address book and Anagram for Blackberry to capture the required contact data from our email enquiry form. Both are then synchronised with my Outlook contacts. Either from the point of creation, or through ...

How do I generate random, non-repeating numbers that don't change?
I'm setting up a spreadsheet that tracks names and generates random, non-repeating four-digit ID#'s. Is it possible in Excel 2000? The usual way to generate non repeating random numbers is to make a complete list of the possible numbers use =RAND() in and adjacent column, then sort both columns by that auxiliary column and read of the desired number of values from the first column. Jerry bsquared0 wrote: > I'm setting up a spreadsheet that tracks names and generates random, > non-repeating four-digit ID#'s. Is it possible in Excel 2000? ...

Read from Barcode Reader in Excel and Auto hit enter
I am trying to read a barcode off an item, it then goes into it's place in the excel sheet but I cannot get it to automatically hit enter, I have to walk back to machine to hit it. As I recall (12 years ago...) there is a setting on the barcode reader to add Line Feed -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Neo" <Neo@discussions.microsoft.com> wrote in message news:FB95BB3A-91C8-4965-9528-7D32920B81EB@microsoft.com... >I am trying to read a barcode off an item, it then goes into it's place in > the excel sheet but I cannot ...

Error Number: 0x800ccc0e when I try to get messages
Hello, I am a postmaster of our network and I am having some problems with Outlook 2000 and our pop3 server. The problem is that randomly, Outlook's users can not download their mail because they get the error number 0x800ccc0e when they try to send amd receive mail. We are using Microsoft Outlook 2000 SP-3 (9.0.0.6627) and our server is a Linux Debian running a 2.4.27 kernel. I have tried with ipop3d and in.qpopper as a pop3 daemons and with both I get the error. There is no firewall between them and this is the tcpdump capture from the server (our pop3 server runs at port 40110, bu...

Excell 2002 xp
need to enable file sharing so that we can have version control on a Excel document Tools, Share Workbook, select (put a check mark into) the option "Allow changes by more than one user...." Then make choices in the Advanced tab as desired.... MRO "sarosh Tafti" <sarosh.tafti@mcdanalds.ca> wrote in message news:071401c38219$9bcc8110$a401280a@phx.gbl... > need to enable file sharing so that we can have version > control on a Excel document ...

How can I have an initial zero in an Excel cell?
I want to be able to enter times as eg 0845 but no matter what cell format I use, there is a problem, either that the initial zero is lopped off or that I am informed there is an error. Is there any way of solving this? try <format><cell><number><custom> enter 0000 and you will get a four digit display with an initial display with a leading zero. Note this is not a time function "ALupin" wrote: > I want to be able to enter times as eg 0845 but no matter what cell format I > use, there is a problem, either that the initial zero is lopped off or...

Clear rows where field contains a negative sign
I have a procedure called that looks for a negative sign (*-*) in the D column for all records. If it exists, the entire row is deleted. The procedure below works well for this situation, BUT when there are no records with the negative sign in the D column it deletes the first record in row 1. The Range somehow is set for the value in the D column for row 1. I have been unable to stop this so far. Does anyone have a way to not delete row one if the filter is not met? Here is the procedure: Sub CleanCancelledChks() Dim r As Range With ActiveSheet ActiveSheet.Columns(&...

excel causing system to be in low system resource
Hi all. Whenever i open my excel application, i am always prompted low system resource and have to exit the application. However all my other office applications like word, access work fine when i open them. I face similar problems before and i reinstall excel to solve the problem. Is there a better solution which can solve this problem once and for all? Thks in advance ...

Change theme colors in Excel
Working in the Excel 2010 Beta version, but I think it's the same in 2007... How can I change the theme and/or standard colors? I can find the colors I want with "more colors" but I have to add to recent colors EACH time I use Excel. Any way to change default settings for the color palette? ...

Copy sheet in Excel
Hi Wonder if anyone of you encounter this problem before? When I try to copy worksheet in a workbook, the following prompt comes up, indicating name conflict. "A formula or sheet you want to move or copy contains the name 'aaaa', which already exists on the destination worksheet. Do you want to use this version of the name? - To use the name as defined in the destination sheet, click Yes - To rename the range referred to in the formula or worksheet, click No, and enter a new name in the Name Conflict dialog box" When I clicked yes, another prompt comes up indicating ...

Avoid pasting over hidden rows
Hi All I have a quick question in regards to pasting data over a range with hidden rows. Is it possible to paste data over a range of cells and avoid pasting data in hidden rows? Let's say sheet2 has data in range A1:B5 and row 2 is hidden. Let's say I copy range A1:B4 from Sheet1 and paste on Sheet2 starting in cell A1. I would like the data to paste over rows 1,3,4 and 5. (skip hidden row 2) I'm pretty sure the answer is no but I thought I'd ask anyways since there are some clever folks out there who might find a way. (Without using VBA) Thanks in advance. W...

Prevent functions from changing when new rows are added
I have a worksheet configured as a timesheet, where each row represents a task performed. For any given day, I track the task(s) performed and the hours spent on each task, and there are many functions in the worksheet. The worksheet contains the following columns: Column A: blank column (not used for anything). Column B: series of dates (with a blank row in between each date). Column C: tasks performed, manually entered. Column D: hours worked on the task. Column E: hours worked for the week. There's a function in each cell where, if it's Sunday, a sum of the week's...

[Excel 2003] problem in files with pivottables after install Office Service Pack 3
Hi all. System: Windows XP Pro SP2, Office 2003 Professional + Service Pack 3 I have a problem with some xls files after install office service pack 3. With service pack 2 this files normal open. With service pack 3 after open file displays dialog (my translate from russian) "In workbook ... have contents which can not be read. Try restore contents of workbook ? If you trust source of this workbook, press button YES". If I press "No" - file not opens. If I press "Yes", displays next dialog. This dialog form content a list of corrections in file. Biggest pa...

insert>video option is grayed out in frontpage 2003
the option is grayed out on the menu. Take a look at this article: How to insert a video in FrontPage 2003 http://support.microsoft.com/kb/825508/en-us -- ~ Kathleen Anderson Microsoft MVP - FrontPage Spider Web Woman Designs http://www.spiderwebwoman.com/resources/ Please reply to the newsgroup for the benefit of others "pagewest" wrote: > the option is grayed out on the menu. ...

Historical customer item numbers?
I posted this an hour ago, but it disappeared(!).... We have customers that change their SKU numbers frequently. So, physical item #A might have SKU #1 today, but SKU #2 next month. We need to show the correct SKU on our invoices to them. We were going to use the Sales Item Cross Reference table (SOP60300), but we realized this is a "live" value - that is, if we reprint an invoice it will show the latest SKU number, not necessarily the one that was originally invoiced. Does anyone know how we could deal with this? Does version 10 have any new fields in the SOP Order line tab...

line graph-need to pick up dates as values for the x axis?
How do you get a line graph to pick up and show dates as the values on the x axis, not starting at zero nor at the first of the month. There doesn't seem to be anywhere for x-axis data to be transferred to the x- axis. I did put the dates into a row of cells and highlight them. i am using MS office 2000. Go to Source Data on the Chart menu. On the Series tab, select the series, then click in the XValues box, clear it if necessary, and select the range that contains your dates. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions ht...

Combining Excel files
This is a multi-part message in MIME format. ------=_NextPart_000_0012_01C39406.568A3A80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have all my timesheets in separate files and I would like to extract = values from each file to use in analyzing my time spent on projects and = time spend doing administrative tasks, etc. Can someone give me some tips on how to get started (e.g.. how to = extract valves from one file to another) Thanks Cory ------=_NextPart_000_0012_01C39406.568A3A80 Content-Type: text/html; charset="iso-8859...

End of range changes when I add a number
Please could someone explain why Excel 2000 changes the range in another cell when I type a number into a blank cell? I have a spreadsheet that calculates income by month, something like this: Month Income1 Income2 Income3 Cost Total Jan06 23.99 44.77 55.00 123.76 The Total cells contain a formula =SUM(B2:D2)-E2 (actually there are more income columns, but this is the principle.) I copied this Total formula in the first row, and pasted it into the other 11 rows for the other months. Originally there was no cost column. I inserted this column, and then modifi...

how to fix cells in excel and other move
I saw alot of excel wher some celles do not move and other move up and down so can any body help me to know how to make it Try this. Click on a cell, say B2 and pull-down: Window > Freeze Panes -- Gary''s Student - gsnu200847 "Bassam" wrote: > I saw alot of excel wher some celles do not move and other move up and down > so can any body help me to know how to make it ...

How to put VBA formula in Excel Sheet
hi there, how can i fix the error for this VBA? Sub PutDate() Range("A1") = "="Date :" & TEXT(TODAY(),"dd-mm-yy")" End Sub pls. help me for this. thanks in advance. EricBB One way: Public Sub PutDate() Range("A1").Formula = "=""Date :"" & TEXT(TODAY(),""dd-mm-yy"")" End Sub Note that quotes within the formula string must be doubled. In article <AA203817-803E-40C2-B617-7B1BDC3E1A59@microsoft.com>, EricBB <EricBB@discussions.microsoft.com> wrote: &...