Count The # Of Rows In A Spreadsheet In Which There Is Non-blank Text Data In 2 Separate Columns

Dec 5, 2008

I am trying to count the # of rows in a spreadsheet in which there is non-blank text data in 2 separate columns. For instance, if the spreadsheet looked like the one below (dashes just for formatting purposes):

NAMES-------THIS-------------THAT
Mary-------some text--------some more text
John-------<blanks>---------just text here
Sue--------just some here-----<blanks>
Dave-------something--------something else
Adam------<blanks>-----------<blanks>

The total # of rows with something in both the "THIS" and "THAT" columns above would therefore be 2.

View 4 Replies


ADVERTISEMENT

Separate Numeric / Text Combination Into Two Separate Columns

Oct 9, 2013

How can I separate the following numeric/text combination into two (2) separate columns in Excel?

302ALTO
406AMZN
451AMRC
404AMAD
605ANCC
405ADRC

The result would be:

302 ALTO
406 AMZN
451 AMRC
404 AMAD
605 ANCC
405 ADRC

View 6 Replies View Related

Spreadsheet For A Couple Hundred Rows Of Data And 6 Columns

Jan 4, 2010

I have a spreadsheet for a couple hundred rows of data, and 6 columns. The fifth column contains a date. What I need to figure out is this:for every 3 rows of data, if the date diffes in column 5 (E), highlight this row and the previous 2 rows

Currently, I've been doing this all manually, row by row - needless to say, it takes me a few hours or depending on how much other work I need to do, a few days.

View 9 Replies View Related

Macro To Separate Lots Of Rows With Certain Amount Of Blank Rows

Feb 15, 2014

I have been using this macro to separate lots of rows with a certain amount of blank rows.

Example:

Code:
Sub test()
Dim j As Long, r As Range
j = InputBox("type the number of rows to be insered")
Set r = Range("A2")

[Code] .......

I trying to change it so that, instead of inserting how ever many blank rows, it just copys the row above.

Example (Row A to C)

I have been messing around with macro recorder and i could select each row and paste it into the blank rows, but from researching on the internet selecting and pasting data seems to be a waste of resources (ram?) and i will be running this on a couple hundred rows (lots of data). Also, i would like to keep the functionality so that i can still choose how many times it copys/inserts each individual row from a input box.

I eventually want the data to end up like it is shown in the table but i am takin it one step at time because i want to understand what the code is doing.

View 1 Replies View Related

Excel 2010 :: Transposing Data With Blank Rows In Columns

Feb 10, 2014

We utilize large data sheets that can be as large as 300K in rows and 10 to 15 columns wide. Because of how we receive the data, we are forced to manipulate things so that all matching data for a record ends up on a single row. (e.g. Record#, Document Type, Husband Name, Wife Name, Wife Maiden Name, Etc.)

Right now here's how the data is received:

a
a
a
b
b
c
c
c
c
d
d
d
e
e
e
e

Using two vba scripts, we first separate the data with row spaces between the unique data as follows:

a
a
a

b
b

c
c
c
c

Then with another script, we transpose the data as follows:

a a a
b b
c c c c
d d d
e e e e

When we transpose the data, the end result starts at the top of the page and go down eliminating the original blank rows. Not a huge issue but I would like to be able to maintain the original data format of the rows so that the data matches the original sheet line for line. The end result would give me the data as follows...

a a a
b b
c c c c
d d d
e e e e e

where the vertical gaps between the letters matches the original rows. Like I said, not a huge issue since we can rejoin the transposed data to the original data fairly easily. But it would be nice if we could end up with the above format for speed sake.

The two scripts we use, one-to insert the rows and two-to transpose, take a very long time to run with the transpose script taking the longest by far. On a 30K row sheet, it will take on our systems around 30 minutes to transpose and about 15 minutes to insert rows. Because we have several columns that need to be transposed, a 30K row sheet will take at least 2 hours to complete. A 300K row sheet, that will take 10 to 15 hours to complete.

Is there any way to speed up the scripts either by upgrading to a faster CPU and or writing the scripts to preform faster?

My preferred solution would be to write (have) a formula to preform the transposition that gives me the results as noted above since formula's run so much faster than vba. Is this possible? I have tried all kinds of formulas and can not come close and of course the straight transpose function does not give me the solution I need as noted above.

I have enclosed an excel 2010 spreadsheet with 10K rows of data in rows along with the scripts I use (nothing sensitive here). The tabs at the bottom shows you the data before I transpose, then the data after it has been transposed . To speed up the scripts, I have stripped away the all the rest of the data from the original sheet except just what I need to transpose at one time. Once that is completed, we then re-join the transposed data with the original sheet. The six digit number you see to the far left of the data is the record ID number from the original data. We use this to rejoin the transposed data with the original data so that we know everything is back where it should be. (Note: The insert rows script is run on the original data and not the data you see on the enclosed spreadsheet. That is the only way we can generate unique rows with matching ID numbers. We arrive at this by taking the original data, concatenate the record ID with the column we want to transpose and add a # between the two so that we can break things back apart after the transposition using the text to column function using the # as the separator.)

The sheet I have attached is in the 2010 Macro Enabled format...(xlsm format). We use the xlsb (binary) format for the data to reduce the file size as our normal procedure and run the macros from inside that format. Changing from the xlsx to xlsb format did seem to speed up the scripts a bit and greatly improved the file performance as a whole e.g. saving and loading.

One thing I have done to speed up the scripts is to strip all the data away that is not needed for the transposition. That did work but only a marginal amount.

We are using windows 8.0 with 4G memory and your basic processor speed...e.g. nothing fancy.....just your basic stock computer. Nothing else unusual is installed or running on the computer or at the time the scripts are running.

For those of you that process large sheets, how much of a performance upgrade will we see in processing our scripts by either upgrading memory to 8G (or more or much more) and or getting a faster processor? Or have we reached the maximum script speed already? Or is this a limit to Excel.

One other issue to note: As I stated above, on the 30K row sheets, not a super problem with about 2 hours needed to run the scripts on all the data on the sheet. But on the 300K row sheets, it can take 12 or more hours to run and there are times when things 'lock up' running the scripts on sheets this size.

View 5 Replies View Related

Count Blank Cells Within A Range Not Including Fully Blank Rows

Jul 15, 2008

I can count the blank cells withiin a range using

=COUNTBLANK(C6:AD2506)

But I dont want it to count the cells if the entire row, within that cell, i.e. C6:AD6, is blank.

It should only count the blank cells within a row if there has been some data entered on that row..provided it has been entered within the specified range.

View 14 Replies View Related

Deleting Blank Rows (without Any Text Or Data)

Jun 17, 2009

In a rage of rows I have some rows that are blank - without any text or data. Is there a macro I might enter that will look at the range of rows, determine which are blank and then delete the blank rows?

View 9 Replies View Related

Count Columns With Data Then Insert That Number Of Rows

Feb 11, 2014

Original

01012014 DAVE JOHN
02012014 MAT
03012014 CHRIS MIKE PHIL

What I want

01012014 DAVE
01012014 JOHN
02012014 MAT
03012014 CHRIS
03012014 MIKE
03012014 PHIL

View 4 Replies View Related

VBA Command Loop Through Spreadsheet Rows Until Blank Rows

Apr 22, 2012

Using excel's text to speech I've put together a basic spreadsheet.

[URL]

Code:
Function talkit(Speech)
Application.Speech.speak (Speech)
talkit = Speech

[Code]....

View 9 Replies View Related

Add Separate Columns Together To Get A Total Count Of A Specific Criteria

Jul 20, 2009

I am trying to add separate columns together to get a total count of a specific criteria. The formula I am using is:

View 3 Replies View Related

How To Split Text From Text String Into Separate Columns - No Delimiters

Apr 8, 2014

I have the cell data as below

How would I split into a new column the first part which is a date into a new column, then the country and the remainder into separate columns?

I still want the original data as I need to check that the splits worked well?

16.5.90 CH 1671/90-4
18.10.1991 CH 3056/91-1
24.07.92 ch 2341/92-2
30.7.92 ch 2395/92-3
18.11.92 Us 3533/92-5
26.5.93PCT 1577/93-0
9.8.93 CH 2363/93-8
17.8.93 CH 2445/93-0
25.1.94ch209/94-6;8.12.94ch3714/94-1
25.1.94 ch 209/94-6 ; 8.12.94 ch 3714/94-1
8.4.94 ch 1047/94-0
22.4.94 ch 1255/94-7
18.11.1992 CH 3533/92-5
18.11.1992CH 3533/92-5

View 2 Replies View Related

Removing Blank Rows In Spreadsheet?

Feb 2, 2006

Is there a quick way to remove blank rows quickly. I have a spreadsheet with over 8500 rows but some are blank.

View 8 Replies View Related

Delete Off All Blank Rows In A Spreadsheet

Jul 20, 2006

How can I delete all blank rows in a spreadsheet without sorting the data as I want it to be in the exact order it is in.

View 5 Replies View Related

Text File Import Produces Unwanted Blank Lines Between Rows Of Data

Jan 19, 2010

After doing some searching I found a macro here which imports multiple text files into one workbook, keeping each text file as a seperate worksheet, each worksheet named the same as the original file name (minus the .txt extension).

However, it adds a blank line between each line of text. So I get this:


Pinging 172.27.133.29 with 32 bytes of data:

Reply from 172.27.133.29: bytes=32 time=232ms TTL=62

Reply from 172.27.133.29: bytes=32 time=62ms TTL=62

Reply from 172.27.133.29: bytes=32 time=65ms TTL=62

instead of this:........

Pinging 172.27.133.29 with 32 bytes of data:

Reply from 172.27.133.29: bytes=32 time=232ms TTL=62
Reply from 172.27.133.29: bytes=32 time=62ms TTL=62
Reply from 172.27.133.29: bytes=32 time=65ms TTL=62

This doesn't happen when I use the import wizard, or when I just open the file from the File -> Open menu.

My text files are always the same format (number of lines, etc.), so it's easy to delimit and insert forumlae as needed, but those extra lines are breaking a macro I've previously written to parse the data.

View 9 Replies View Related

Automatically Hide Blank Rows In Spreadsheet

Jan 22, 2008

I have a spreadsheet that is linked to another spreadsheet in a workbook. The information comes from an export of an access query into a template in excel that I am using just to store the values, then I link the values to the appropriate field in another sheet. I was wondering is there a way to programmatically hide blank rows in this sheet starting at a specific row of the page.

View 4 Replies View Related

Count Unique Text Entries Given A Certain Condition In A Separate Range?

Aug 11, 2014

I need to count the number of unique text values in the first column given a condition in the 2nd column. For example, the formula that I'm looking for should give a result of "3" because it is an SME, and there are 3 unique companies that are classified as SMEs.

Company Name
Company Type

Company A
SME

Company B
SME

(I cant seem to make the tables visible but Company A and Company D right below the header should be in one cell) This should still yield a value of "3" despite having Company A and D in the same cell.

View 5 Replies View Related

Excel 2010 :: Separate Two Rows To Two Columns?

Feb 26, 2014

I am trying to separate two rows to two columns. How can I do this for +200 data. For example,

1
Apple
2
Ball
3
Candy
....
I need this to be:
1 Apple
2 Ball
3 Candy
and so on.

show me how I can do this for Excel 2010.

View 3 Replies View Related

Move Data In Columns If Rows Contains Particular Text

Feb 24, 2014

If the row contains a text like ABC in multiple columns in a sheet it has to copy the whole column from that sheet and paste special into another sheet.

View 2 Replies View Related

Subtracting 2 Columns Of Data From Each Other When Labels In Separate Columns Match

Feb 20, 2009

I have four columns of data, as follows:

label 1, value 1, label 2, value 2

I need to create a formula in the fith column that for each line will tell excel to:

look for entry in 'label 1' in 'label 2' if there is a match, then subtract value 1 from value 2, display result.

I have tried doing this with SUMIF but am getting nowhere fast....

View 7 Replies View Related

How To Count Non-blank Columns

May 11, 2012

In a single cell I want to return the number of columns in a matrix which contain entries. So, for the matrices below the formula should return '2' (two columns contain values):

A1: 0 , B1: 0, C1: 1
A2: 1 , B2: 0, C2: 1
A3: 0 , B3: 0, C3: 1

A1: d, B1: e, C1: 0
A2: 0, B2: f, C2: 0
A3: 0, B3: g, C3: 0

View 3 Replies View Related

VBA Macro To Loop Text To Columns Through All Rows Of Data?

Apr 17, 2014

I am trying to get a macro to run in excel that takes a simple text to columns command in one line of data and runs the command on a loop through however many rows of data there happen to be.

I've attached two screenshots - one with what I've got now (Before.jpg) and what I'd like to have after the macro runs (After.jpg). The code below is what I used to get the first text to column breakout, which I can hopefully run on a loop to breakout anything in the DEPT column that contains a "/". It can ignore the rows that only have one department to begin with.

Selection.TextToColumns Destination:=Range("K2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="/", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True

Eventually I'll want to create another macro that transposes the breakout text back into the DEPT column and populates it with the corresponding data, but I figure I'll take things one step at a time.

Attached Images
Before.jpg‎
ter.jpg‎

View 10 Replies View Related

Export Columns To Separate Text Files

May 31, 2014

i have attached a sample for you to see what i am after.

I am after the following:

1. Export each column to a text file

2. Need the results from rows 2 - 30 in the text file.

3. Want it to save the files as row 1.

View 1 Replies View Related

Excel 2010 :: Lines Count - How To Expand Amount Of Columns In One Spreadsheet

Dec 27, 2011

I'm using Excel 2010. One spreadsheet I'm using has 1048576 lines and is a XLSX file. The other file has 65536 lines and is also a XLSX file. When I try to do a VLOOKUP, I'm given an error stating "invalid reference. This file version cannot contain formulas that reference cells beyond 256 columns or 65536 lines.

If both are XLSX files how do I expand the amount of columns in the one spreadsheet with 65536 lines? I thought all XLSX files had a million lines.

View 4 Replies View Related

Splitting Text And Numbers From 1 Column Into Separate Columns

Jul 24, 2014

I have some data that is both text and numbers in the same cell. I would like to split the the data so that the text is in one column and the numbers are in another column.

The numbers are all a fixed length (15 chars) so I know that I can use the following formula = RIGHT(A1,15)

However I am not quite sure how to split the text as the length can vary as as well as the number of words in the string.

For example A1 is 1 word with 7 characters but A2 is 2 words, 14 characters long inc space.

A1 Goodwin 000710280740120
A2 Gillette Ridge 000715058510122

B1 Goodwin
C1 000710280740120

B2 Gillette Ridge
C2 000715058510122

View 4 Replies View Related

Splitting Text String (address) Into Separate Columns

Jun 2, 2014

I have address that sits in one cell only and I need to separate into two or three columns (streetname, street number, streetletter).

Is this possible as the length of street text, numbers and letter differs all the time...

Attached is a sample file with before and after result

address.xls‎

View 5 Replies View Related

Split Address Text String Into Separate Columns

Mar 13, 2009

I would like to "reverse concatenate" an address text string as follows: ....

View 9 Replies View Related

Separate A Line Of Alternating Text/Numbers Into Columns

Jul 20, 2009

I have thousands of lines of data that are of the following form:

Jackson, TN 9623 BCBS TN 98 UnitedHlthCare 2
Jacksonville, FL 3577 Aetna 47 BCBS FL 37
Knoxville, TN 3796 Cariten 44 John Deere 41
Lakeland-Winter Haven, FL 2165 UnitedHlthCare 31 Aetna 29


I need to separate these lines into columns such that, for example, the first line would be in 6 columns: (Jackson, TN) (9623) (BCBS TN) (98) (UnitedHlthCare) (2)


The delimiter does not work because some of there is no one character that always separates the text and the numbers. I've tried going through in word and typing something like '%' where I want to separate, but with thousands of lines of data that is extremely tedious.

Is there any formula I can use that would be capable of solving this?

View 9 Replies View Related

Extract Text From Column :: Place Into Separate Columns

May 14, 2007

I have a long column of info as below. I want to extract (the name changes)- "SEAPORT TWN" etc and also "01.30" and place into separate columns say G and H at the next available cell.

**
SWITCHLIST FOR TRAIN---Grain Spec -East
DEPARTURE TIME from WESTTOWN is 01:00
TOWN STOP---SEAPRT TWN Arriving at 01:30

PICKUPS
Terminal Shipping Burl North 460020 GRAINCAR empty Elevator Co. Ltd.
Terminal Shipping Sante Fe 100396 GRAINCAR empty Elevator Co. Ltd.
Train should leave this town with 2 car(s)
TOWN STOP---PRARIE TWN Arriving at 02:00

SETOUTS
Elevator Co. Ltd. Burl North 460020 GRAINCAR Grn w/Wht Lttrs -4 Bay
Elevator Co. Ltd. Sante Fe 100396 GRAINCAR Maroon w/Wht Ltr -3 Bay
1/05/2007 8:57:52 a.m. ...............................

View 2 Replies View Related

Count Non-Blank Rows

Apr 24, 2006

It effectively counts the number of non-blank (>0) rows in an array. This
formula is limited, however, in that every column requires a separate
statement. I would like to find a function that could handle an array of any
size with a single statement.
100
110
000
001

3=SUM(IF((A1:A4>0)+(B1:B4>0)+(C1:C4),1,0))

1=OR(A1:C1>0) for
every row in the entire array. Unfortunately, according to this document AND
and OR functions cannot be nested within SUM+IF statements:

Dim oRow As Range
Dim cNonBlanks As Long

For Each oRow In Range("50:80").Rows
If Application.CountA(oRow) <> 0 Then
cNonBlanks = cNonBlanks + 1
End If
Next oRow

View 14 Replies View Related

How To Count The Number Of Rows Until A Blank Row

Dec 29, 2012

I want to be able to count the number of rows until I hit a blank row, and use the counter as an index. How is that possible?

I have a no. of rows that are fulled, followed by a blank row then another set of rows that are filled then a blank row etc. I want to count the rows filled till the blank row and set the counter to that number. Then I want to do the same with the next set of rows etc.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved