Functions- Spreadsheet That Contains Data
Jun 11, 2008
I have a MS Excel spreadsheet that contains data as such:
A1 - 01T2001
A2 - 02T7001
A3 - 01T2001
A4 - 99T1001
A5 - 99T1001
A6 - 02T7001
A7 - 93T0120
.
.
.
A9999999 - 02T7001
A1000000 - 93T0120
There are duplicates in the data. Excel functions to identify the duplicates. I received a VB code from a friend but there are over 1 million rows on my spreadsheet, and it took more than a day but the scribe is still running. I want to try using a COUNTIF or FIND function to see if it couldspeed upthe process.
The code I receive from the friend is
Option Explicit
Public Sub Main()
Range("A1").Select
Dim strColumn As String
strColumn = InputBox("Please enter the column that contains the duplicates.", , "A")
If strColumn = "" Then Exit Sub
Range(strColumn & "1").Select
ActiveCell.Sort Key1:=Range(strColumn & "1"), Order1:=xlAscending
Do
If ActiveCell.Value = ActiveCell.Offset(1, 0).Value Then
Rows(ActiveCell.Row).Delete Shift:=xlUp
Else
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell.Value = ""
Range(strColumn & "1").Select
End Sub
View 9 Replies
ADVERTISEMENT
Feb 1, 2008
i have a spreadsheet that uses control functions to run vb code. i am trying to make things as user friendly as possible for all of the employees. i am currently working on a control to clean out any rows that the first cell has a value of "N/A" or is left blank. i have the code for the blank cells, but cannot figure out how to add the "N/A" cells.
here is the current
Private Sub CommandButton2_Click()
Dim rng As Range
On Error Resume Next
Set rng = Columns(1).SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Delete
End If
End Sub
View 9 Replies
View Related
May 25, 2009
I am trying to make a multiple nested spreadsheet. I get as far as the first 2 and then can't seem to get the data validation to work. I tried several different formulas (indirect(vlookup)) ones but must be doing something wrong. I have the "lists" on the second sheet to be referenced for the first sheet as drop down menus.
I do building material appraisals and this sheet will be to help me with the inspections if I ever get it done. It is supposed to work like this - Area - Item - then depending on the item - three consecutive dropdown lists with further information.
View 4 Replies
View Related
Aug 11, 2013
I have two spreadsheets, one gives me the beginning and end of civil twilight as a measure of day vs. night. The spreadsheet has Date/Time in the first column, and the value 45 in the 2nd column when it is night. The second spreadsheet has also 2 columns with date/time and body temperatures of a squirrel. I want to get basic statistics (mean and standard deviation) of the squirrel's nocturnal body temperature, that is for times when it is night (value 45). The tricky part is that Date/Time of both spreadsheets are different. The procedure has to recognize that the date/time of body temperature lies between the beginning and end of the value 45 blocks of the first spreadsheet.
files: twilight sheet squirrel temperature
View 6 Replies
View Related
Feb 6, 2009
Often I need to add data from one spreadsheet to the appropriate places on another spreadsheet. For example:
Sheet A has 10,000 records with these fields: id#, name, address, place of employment.
Sheet B has 5,000 records these fields: id#, GPA, college major, type of degree.
Some of the records in B contain information for the same id#'s as sheet A. I want to add this information together so that a Sheet C will have these fields: id#, name, address, place of employment, GPA, college major, type of degree.
View 3 Replies
View Related
Apr 2, 2014
Wondering if there is an easy way to compare 2 spreadsheets that should have identical data on them? The first spreadsheet (Before) has the output data from 'before' a code fix was applied. The second spreadsheet (After) has the output data from 'after' a code fix was applied. The spreadsheets have 7 columns of data and almost 500 rows.
I've already copied the data from the source datasets provided by my IT folks into Notepad (.txt) files and then used Excel to open them as fixed width spreadsheets. I have 1 workbook with 1 spreadsheet with 'before' data. And, I have 1 workbook with 1 spreadsheet 'after' data. And, I have another workbook that contains both worksheets. So, I'm ready to go whenever I get hints of what to do next. :-)
I need to be able to show my client that we did not impact the data with the code fix that was applied. I want to be able to show my client contacts (business folks) an end result via Excel that confirms that I actually compared the 2 sheets and there were no differences. In other words....I can't just show them a formula with '0' as it end result (even tho that's basically what I'm trying to prove).
View 6 Replies
View Related
Apr 24, 2006
I need to write a macro that will import data contained in another spreadsheet, but am unsure how to do this. I have several (about 15) spreadsheets that contain data. I need to import key bits of this data into one central spreadsheet that will be used for reporting purposes. I only need 2 cells worth (values) from each source spreadsheet, to be pasted into the destination spreadsheet, into designated cells.
The source spreadsheets are usually closed down and kept on a file server, which my PC has access to. Ideally I want to activate this macro with a control button - i.e. I press the button once and the macro goes off and collects/updates each field with the latest data stored in each of the source spreadsheets.
View 7 Replies
View Related
Mar 13, 2009
I have a very large grid of data, about 400Rx200C, which contains a lot of blank fields. All of this data is currently in values from 0-100 representing percentages, but not formatted as such. I need to make all of these values into Excel Percentages so naturally used Paste Special and Divide from a field with the value 100 in it and then simply format the cells as %.
However, this fills in all of the original empty cells with a 0.000% which I do not want, I need them to stay blank. And some of the cells that do have values also have 0.000% so I cannot just delete all of these values with a VBA script. I had been hoping the Skip Blanks option would do this, but it does not unfortunately.
View 3 Replies
View Related
Jan 9, 2006
I have some data recorded for every day for some subjects.
And the possible recorded value on each day is: 0 or 1 or 2 or 3 or 4 or null.
I have this type of data for number of subjects over many months.
My data looks like below.
Subjectnameyearmonth day1day2…………..day30day31
Name1990January 2044
Name1990February 31nullnull
Name1990March 2null31
So on.
I need to calculate the following 3 for each row.
1) On which day of the month first occurrence of the 4 comes?
This one I figured out using match() function which I paste below.
=MATCH(4,N2:AR2,0).
2) On which day of the month last occurrence of the 4 comes?
My data can not be sorted, and I couldn’t use match function here.
3) If there are any 4’s in a month, how many consecutive 4’s are there?
View 14 Replies
View Related
Apr 21, 2006
I'm at an impass and need some help please. I'm trying to create a spreadsheet that will look up UNSORTED data in Column A and return the value of the corresponding Row data in the adjacent column. Can this be done? It is my understanding that LOOKUP functions only work with sorted, ascending data, but this is not possible with the data I'm trying to analyze.
(eg. COLUMN A - contains unsorted list of names
COLUMN B - contains numbers indicating skill level of the person in the next column
I need the formula to look at column A, pick out "Joe Smith" and return the number value from COLUMN B)
View 3 Replies
View Related
Nov 4, 2012
I wish to Automatically copy the TEXT that is written from Spreadsheet 1 cells D5 to F5 to Spreadsheet 2 cells F5 to J5 .... a similar range of cells.
Is there a formula I can use or do I need to venture into the programming side of things.
View 7 Replies
View Related
Mar 27, 2014
When I select anything under the Data Table drop down nothing happens. It is like none of the functions are enabled?
Data Table Picture.png
View 2 Replies
View Related
May 11, 2014
I have the following data. i need to count 5 times "N-TRX1" IN column "D". and returns me input "true/false". but the catch is that i need then to overlook this 5 times and start to count again from the same column without deleting the old data. Can i do it?
A
B
C
D
E
date
STATION
NO
NO+STATION
11/05/2014
N-TRX
1
1N-TRX
[Code] .........
View 4 Replies
View Related
Dec 2, 2009
Is it possible to use a today or now function in an sql query to an external datasource in excel 2007? I have an excel 2007 spreadsheet, that I have linked to our financial database (MySql) using the database wizard. I can get the tables to display in excel no problem. One table shows how much staff have billed in each invoice period. I would like to create a query in excel, so that when this table displays in excel it shows how much each staff member has billed for the current invoice period, as opposed to all of them.
We weren't sure how to do this, so we decided to do a query to pull out the current invoice period, then we could combine this pivot table with the one for the amount billed table to give a table showing the amount each staff member has billed in the current invoice period (do this bit in excel).
The problem is we can't seem to make the query to pull out the current invoice period work. We have tried the query below, and all the variations of it that we can think of
SELECT invoice_period FROM tbl_invoice_periods WHERE STR_TO_DATE('" & NOW() & "', '%d/%m/%Y') BETWEEN start_date AND end_date;
We have also tried referencing a cell which shows the current date, but we cannot get this to work either (we may have made a mistake in the query here, we are not entirely sure how to reference an individual cell). The only way we have been able to get it to work is if you enter the current date directly into the query, but obviously this means it's no longer automated, which isn't a solution.
View 3 Replies
View Related
Feb 7, 2007
I am trying to achieve can not be based on a range of rows or cells it must as this data is imported from a forecasting application and the location of the targets may change.
Perhaps an offset to the current selection can be used some how, but have a look-see if you know where Im coming from.
'I have used this to find a target in a data range.
Dim r1 As range
Public Sub FindDataIn Range(r As Range, target As Variant)
Set r1 = r.Find(target)
If r1 Is Nothing then
Msg Box target & " was not found"
Else
r1.Select
End If
End Sub
'Then I inserted and Named this procedure to find the data on various assumptions or targets - SUCH AS THE VALUE "14306".
FindDataInRange ActiveSheet.Range (A1:A226), "14306"
Selection.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=x1Down
Selection.EntireRow.ClearContents
Then I write this again for another Target such as 14307 and it repeats
The result is that it finds the target cell I get an empty row above the two rows that contain that target. (LET ME EXPLAIN WHAT I MEAN BY TWO ROWS)
The thing is there are two rows containing 14306 in that range and the range is sorted ascending so that they are positioned one under the other. Each row has different forecast totals beside this number because one is an export SKU and one is a Domestic.
What I want to do is combine the two rows as one with one row of forecast totals for the number rather than two.
Like this:
14306big Widget Domestic 26 89 (This is combined as a new row)
Instead of this:
14306big Widget Export 12 14 (These 2 rows are then deleted)
14306big Widget Domestic 14 75
Also the Forecast totals run across 12 columns (one for each month) and then there is a column for year totals of each row that needs to remain the same.
Most important this here is this cannot be based on a range it must as this data is imported from a forecasting application and the location of the targets may change.
View 9 Replies
View Related
Jan 19, 2014
Trying to grasp the concept of using these 3 functions to search for and return values from a data sheet.
The attached spread sheet has performance data for a group of employees.
What I need to do is find a particular employee then return a value for one of the category's.
For instance, I need to find "10TE03 ANGIE HOLLIS" Parts Usage on color or cell C10 in the attached sample.
Sometimes new category's are added to column A adding to the number of rows so a simple offset is not reliable.
Once I get that working, I then need to use a named range to total and average different data points for groups of employees by teams.
Maybe Offset-Index-Match is not even the way to go here?
View 7 Replies
View Related
Jan 29, 2014
I have 3 calculations I would like to make based on data in the spread sheet and I can't seem to get them to work with data from the two separate columns.
I tried a few of the index match max formulas I found here and could only get them to work with one column of data.
I have the spread sheet attached and the 3 calks I want to do are blank on the bottom.
I am using Excel 2011 for Mac
View 7 Replies
View Related
Mar 14, 2008
I am aware of the following topic in the VBA Help file:
"Using Microsoft Excel Worksheet Functions in Visual Basic
You can use most Microsoft Excel worksheet functions in your Visual Basic statements. To see a list of the worksheet functions you can use, see List of Worksheet Functions Available to Visual Basic.
Note Some worksheet functions aren’t useful in Visual Basic. For example, the Concatenate function isn’t needed because in Visual Basic you can use the & operator to join multiple text values."
And I'm aware of how to call Excel funcitons from within VBA; e.g., answer = Application.WorksheetFunction.Min(myRange)
However, not only are some Excel functions not useful; the fact is they cannot be used because VBA has a native function that does exactly the same thing and you have to use that native VBA function to achieve your goal. It is these overlapping functions that I am especially interested in. I want to know what I should use directly in VBA and what I need to go to Excel for.
View 9 Replies
View Related
Nov 3, 2013
I am working on Excel 2010. I want to find a way to link data from one spreadsheet to another one and whenever I update the first spreadsheet, the second one will be automatically updated?
View 2 Replies
View Related
May 17, 2014
I have a parent spreadsheet with raw data(with errors) and a child spreadsheet without errors. I want to merge the child into parent. (:{). I am thinking of comparing multiple columns from each sheet to ensure maximum accuracy. And when those columns match up we paste the corrected column data from child sheet to parent one. I am using windows 7 and Excel 2010.
View 1 Replies
View Related
Apr 24, 2009
Rylo thanks for your help on the other project. Here is step two for the same project.
Basically I'm going to list a step by step list of what needs to be done then attach some sample sets so you can see what I'm talking about.
Step 1 ........
View 12 Replies
View Related
Dec 6, 2006
I have one source spreadsheet, where are columns NAME, DATE. I read these data by ADO to other spreadsheet, where I can change/delete data and then run macro for update data in source spreadsheet. The problem: In source spreadsheet is column "NAME" and column "DATE", with values e.g. "Joseph"; 1.1.1980. I read this data to other spreadsheet, then I delete in it value 1.1.1980. When I run macro Update, it messages error.
Sub UpdateItem
...
.Fields.Item(1).value = activecell 'activecell value = "Joseph"
If Not isempty(activecell.offset(0,1)) Then
.Fields.Item(2).value = activecell.offset(0,1).value
Else
.Fields.Item(2).value = "" 'I tried Empty and 0 too but when I read data again then, it displays 0.1.1900, nothing works
End If
...
End Sub
It seems that in source spreadsheet has data in column "Date" format Date and when I try to update data in format String ("") in source spreadsheet by Update macro, it messages error. When I used
.Fields.Item(2).Value = Empty
' or
.Fields.Item(2).Value = 0
after rereading data it displays 0.1.1900 What I want to get is that if the cell with date (in other spreadsheet) is empty, the cell in column Date in source spreadsheet after updating will be blank (contains no values).
View 2 Replies
View Related
Aug 6, 2009
I'm wondering if I can use external data in an excel spreadsheet without having to import all the data. I basically need a persistent connection with the external data and I want the excel spreadsheet to get the item descriptions by using the item number as the user types in the item number. Writing out the descriptions is killing me and I have all my products in an excel spreadsheet already. I really need someway to link two separate excel files together. One with data and one with user input that searches that data as I type in the item number.
View 2 Replies
View Related
Aug 21, 2007
I have a spreadsheet with approx 60,000 lines and 14 columns. Col N is month (June to July).
In another spreadsheet, I want to return the data for a specific month. Is this possible?
View 12 Replies
View Related
Jun 11, 2014
Looking to re-arrange particular data in attached SS. Sample has the highlighted data which is then converted to the result SS. Have many rows with variable lengths for each record.
View 5 Replies
View Related
Feb 12, 2008
I have got a spreadsheet with many rows of data. One row is product name and the other is date written. Now I want to calculate how long these entries have been on the log. So lets say I have 10 entries called Pension all with different dates and 10 entries called ISA with different dates. So first I need it to look for all the proucts called "Pension" and then to work out how many are 0-3 weeks old and so on. So i want it to look like this but a formula to work it out for me and to update it automatically.
0-3 Weeks 4-6 Weeks 7-9 Weeks 10 Weeks +
Pension 4 3 3 1
ISA 3 4 1 2
(this does not display very well here but I hope you understand what I mean)
I am using Excel 2003 and I dont think it as a WEEKS function so I will do it in days and then devide by 7.
I know that to look for the product i use
=COUNTIF(H:H,"Pension")
The H:H is because the product is on colum H on my spreadsheet
I know to find the date it is
=TODAY()
So to work out something 3 weeks old it would be
=TODAY()-21
View 14 Replies
View Related
Feb 15, 2009
From the attached spreadsheet I need to transfer all the rows where the issue status in column T is either ongoing or open. Now I know how to transfer them over if row 1,2,3 etc was going into row 1,2,3 etc into the new spreadsheet but as not all rows from this sheet is going over I need to now how to transfer data so in the new spreadsheet it just follows down rather than have spaces in it. i.e. if on this sheet I need to transfer data from rows 1, 5, 10, 15 on the new one they go into row 1,2,3,etc
View 7 Replies
View Related
May 27, 2009
I have been putting together a database of town owned properties. I have about 190 rows with well over 20 columns. Sometimes I need to sort the data in order to find something. However sometimes after sorting the data and not thinking of anything of it, I will open up the file later that day or the next day and I find that most of, or sections of my data are all jumbled up. I then have to re-enter the data to get it to where it should be. I am using Excel 2003.
View 10 Replies
View Related
Feb 11, 2010
I created a 10 spreadsheets for 10 companies that include 25 columns of info each and multiple tabs.
I need to create a master spreadsheet, which contains info from all 10 companies but only 10 of the columns are necessary. I want to ensure that if a change is made in the master spreadsheet in one of the columns for company "A", that change is reflected in their personal spreadsheet as well, pretty much syncing info typed in one worksheet to a spot in another.
Is that possible?
View 10 Replies
View Related
May 27, 2013
What I am trying to do is pull data from one spread sheet into another. The Data spread sheet has 2 columns. Date and Price. What I need to do is enter a date in to row b2 (example 2/13/2013) Then Cells c2-v2 fill in with the data from the 20 days prior to 2/13/2013. Also note that I use only dates from weekdays.
View 7 Replies
View Related