Performing A Specific Function Repeatedly But With Variable Values Each Time?

May 13, 2014

The spreadsheet has over 200K rows and two dozen columns. My job is to:

1. There are two columns, one is called OCR code where we have repeating ID's and other column is called Minutes Count which is basically a number. I have to filter the OCR column for similar OCR codes(values) and then add their time(Minute Count) so that I get total minutes for a specific OCR code. After adding the min I will copy them into a new sheet with the code in one column, total minutes in another and number of repeatitions for that specific OCR code or count number in a separate column. Example:

OCR_Code; Minutes
54xg; 456
45fk; 65
23IS; 18
54xg; 971
45fk; 265
.
.
.

Now I've to filter 54xg so that I can only see it and its corresponding minutes. Then I will add up all min for 54xg. Then I will count the number of instances a 54xg has been repeated in spreadsheet(here its 2 but it can be in hundreds in my case). Last thing is to transfer all this data to a new sheet. And automatically repeat the process for other OCR codes like 45fk, 23IS etc...

View 3 Replies


ADVERTISEMENT

Breaking Time Into Intervals And Performing A Count

Nov 20, 2006

Office 2003 with Windows XP

This is my first post so i may not have done everything correctly. I tried doing google searches to see if anyone else has done something similar but its a tricky thing to search for. I have found pages dealing with manipulating time but none seem to be what I want

I have an Excel sheet with data

A1=date
b1=source
C1-h1 all contain data (name, location, etc, etc) but I am not interested in those.

A1 (the date cell) is formatted like: m/d/yyyy" "h:mm:ss AM/PM

[Sample]

a2 = 8/1/2006 12:20:23 AM b2 = phone
a3 = 8/1/2006 12:21:13 AM b3 = email
a4 = 8/1/2006 12:33:03 AM b4 = phone

This is what I am trying to accomplish:
I want to break each hour, whether it contains data or not and get a count of the different types of source

my desired output would be:

time Phone email
12:00AM
to 2 3
12:30AM

My problem occurs because I am unsure how to break the times down into intervals. In my head, I would create a new column and try to break the time up into an interval. So for a2 (8/1/2006 12:20:23 AM), I think I would need to break the date and time up and then determine which interval would be needed based on the time.

I was going to perform the following:
=text(a2, "h" + if("mm:ss">30, 30,00)

Basically, pull the hour from a2 and evaluate the mins/secs.

If the min/sec is bigger than 30, put a 30 in the box. Less than 30, put double zero in the box. So for 8/1/2006 12:20:23 AM, b2 would have 12:00 since it falls in the 12 to 12:30 interval.

Once I have all the intervals, I would also need to preform a count on the source cell but I think I can use a vlookup to get the count for the interval.

View 9 Replies View Related

IF Function To Compare Specific Time To Time In Cell

Nov 19, 2008

I am looking for a formula to change a condition based on the time of day. Essentially, before 1pm I would like the formula to be:

=((I12/100)*25)/D12

After 1pm I would like the formula to be

=((I12/100)*25)/B12

I tried various ways with "=if(now()> ..." formulas to no avail because of the way Excel handles Now().

View 6 Replies View Related

Adding Variable To Specific Sheetname In A Sumif Function

Feb 4, 2010

Hi, looking for help desperately in fine tuning a formula. I have a formula at the moment (which works) for searching through a list on a separate file and totalling up all values which relate to it, see below:

=sumif([filename.xls]1’!$B:$B,D10,’[filename.xls]1’!$H:$H)

The tab ‘1’ in the formula relates to the first of the month so this month there are 28 different tabs with similar information.

With C10 containing the date in this instance, does anybody know a way of making ‘1’ a variable so that entering ‘04/02/10’ would change it automatically into a 4? (Unfortunately for me changing the 1 to =c10 didn’t work).

View 14 Replies View Related

Countif Function For Counting Values Based On More Then 1 Variable

May 7, 2007

I'm trying to make a spreadsheet that will count the number of times a certain incident occurs, for a particular person, for a particular month. The attached spreadsheet is an example of what I need done.

For the attached spreadsheet, I need to find out how many times x employee has been late for x month, and how many times they've been late overall.

You can see one of the many tries I've attempted in the second sheet, but it doesn't seem to want to work. I have to be able to do this without VBA, because of signature issues.

View 9 Replies View Related

Different Country Time: Reflect The India Time After Pressing A Specific Key In A Specific Cell

Mar 3, 2007

I am working on a system where the system is having "australia time". Now, I want a worksheet where it should reflect the India Time after pressing a specific key in a specific cell.

View 3 Replies View Related

Utilize AVERAGEIF Function For Specific Range Of Values?

Feb 12, 2014

Is it possible to utilize the AVERAGEIF function for a specific range of values. For Example, instead of ">45", I would be looking to only average the cells that have values between 40 & 60. I've tried several different ways to input that into the function but nothing seems to work.

View 3 Replies View Related

Search And Compare" Function For A Row That Contains Two Specific Values

Dec 15, 2006

I'm looking for a function (or combination of functions) that will essentially search for a row that contains two specific values (in two different cells), then grabs a value from another cell in the same row to use in a calculation.

I don't know... that probably doesn't make any sense, and maybe there's no way to get it done. If so, it would save me hours. Couldn't see a way to attch an example file to my post, otherwise I could probably describe it a bit clearer.

View 4 Replies View Related

2007 Macro: Run-time Error 91:Object Variable Or With Block Variable Not Set

Feb 20, 2009

I'm fairly new to macro's and VBA, by searching on the internet i've copied and pasted some code together into a macro.
But it ends in a Run-time error 91...

The macro opens a target .xls file in a selected folder, performs copy - paste actions from masterfile to targetfile.
Than it filters data in the targetfile sheet1 and copy's the results to the various other sheets; saves and closes the targetfile.
The next target file in the folder is opened and the actions are repeated in this second target file.
For the first target file this works smoothly; but for the second one (of a total of around 100) it does not copy the filter results to the other sheets in this workbook.
The error message i get is: "Run-time error 91:Object variable or with block variable not set."
When i hit debug it highlights the line "ActiveSheet.Next.Select" which, at least in the first file, seems ok.

View 9 Replies View Related

Inputbox Value Can Be Compared To A String Variable Or A Numeric Variable At The Same Time

Dec 7, 2008

I am trying to develope a "goto" page macro where the page value maybe 1,34,7A, 256C etc. I am not clear on how an inputbox value can be compared to a string variable or a numeric variable at the same time. This is what I have done, but when the texboxvalue is "7A" it doesn't work.

View 3 Replies View Related

Copy And Paste Special Values But Getting Error 'Compile Error - Expected Function Or Variable'

Feb 7, 2007

I am trying to run create a simple macro that copies and paste special values - something I have done 100's of times but for some reason I keep getting an error message - even though I recorded the macro and didnt write it by hand - see below:

Sub Macro6()
Cells.Select
selection.Copy
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

For which I get 'Compile Error - Expected Function or Variable'

View 6 Replies View Related

Run Time Error 91 Object Variable Or With Block Variable Not Set

Oct 7, 2009

I am having a lot of trouble finding out why I am getting error. I believe the error is because it can't find the number. In cells C115:C314 i have the numbers 1 to 200 in order. when someone types in 1 to 9 in the text box it works, but on 10 and over i get the error ???? here is the code I have

shCalculator.Range("C115:C314").Select
Selection.Find(what:=CInt(txtPackageID), After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Select
x = ActiveCell.Row
shCalculator.Range("ProposedMeter").Value = Cells(x, 7).Value
shCalculator.Range("Package").Value = Cells(x, 12).Value
shCalculator.Range("ProposedMeterAmount").Value = Cells(x, 30).Value
shCalculator.Range("Term").Value = Cells(x, 62).Value
shCalculator.Range("Discount").Value = Cells(x, 67).Value
shCalculator.Range("Equipment").Value = Cells(x, 72).Value

View 3 Replies View Related

Run Time Error 91, Object Variable Or With Block Variable Not Set

Jan 14, 2007

Function Find_Range(Find_Item As Variant, _
Search_Range As Range, _
Optional LookIn As Variant, _
Optional LookAt As Variant, _
Optional MatchCase As Boolean) As Range
Dim c As Range
If IsMissing(LookIn) Then LookIn = xlValues 'xlFormulas
If IsMissing(LookAt) Then LookAt = xlPart 'xlWhole
If IsMissing(MatchCase) Then MatchCase = False
With Search_Range
Set c = .Find( _
What:=Find_Item, _
LookIn:=LookIn, _
LookAt:=LookAt, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=MatchCase, _ ........................

Using the message box I see that sheet 1 opens but then I receive an error message Run Time Error 91, Object Variable or With Block Variable not set. I tried declaring and using set on "project" but got nowhere. I also need to have a message indicating project not found. Once this part is solved I will loop all of my other workbooks

View 5 Replies View Related

Function To Sort A Range By The Values In A Specific Column And Return The Range

Mar 25, 2009

I was just recently forced to create my first UDF and after how well it worked I now am very interested in learning more. I am trying to create a function to sort a range by the values in a specific column and return the range. I know this should be really simple but for some reason my code dies whenever it gets to my inner-most loop. I need to use this in a larger function but for now this is my only question. I did find that Excel 2007 has built in Functions for this but my company still uses 2003.

My
Public Function SortRange(rngToSort As Range, valCol As Integer)
Dim Swapper As Variant
Dim i As Integer, _
j As Integer, _
k As Integer

For i = 1 To rngToSort.Rows.Count
For j = 1 To rngToSort.Rows.Count - i
If rngToSort(j + 1, valCol) < rngToSort(j, valCol) Then
For k = 1 To rngToSort.Columns.Count
Swapper = rngToSort(j, k)
rngToSort(j, k) = rngToSort(j + 1, k)
rngToSort(j + 1, k) = Swapper
Next k
End If
Next j
Next i
SortRange = rngToSort
End Function

View 9 Replies View Related

Summarizing Times For Specific Items Within Specific Time-frame

Mar 26, 2014

I got Excel for Mac 2011 installed. I have a table called 'Raw" that holds data from the beginning until the end of 2013 (in total ~7000 rows). I have columns for Category, Start and End time, and time period in Hours, Minutes, and Seconds:

Code:
A
B
C
D
E
F

Category
Start
End
Hours
Minutes
Seconds

Transportation
2013/01/01 01:00:00
2013/01/01 01:15:00
0:15:00
15:00
900

[Code] ...........

I'm trying to get an overview of how much time I've spent in January on Transportation. I would need to look at the Category entries for Transportation, then only use the ones which have the Start set to 2013/01, and then take the Hours/Minutes/Seconds, and summarise it in a new table called 'Data':

Code:
A
B
C
D
E
F

Month
Category
Occurrence
Hours
Minutes
Seconds

2013/01
Transportation
48

[Code] .......

I have figured out a way to count the occurrences for Transportation for January:

=COUNTIFS(Raw!B:B,">="&"2013/01/01 00:00:00"+0,Raw!B:B,"

View 1 Replies View Related

Repeatedly Using 'ShowAllData'

Apr 29, 2009

I have a worksheet in which lot of information is entered on a daily basis, so far for the year there are 350 rows which I scroll up and down or autofilter etc to look at older info. I have created a button to make it easy to always return to the cell that I have been working on whether I have scrolled up a few hundred rows or used autofilter. Although I always want to keep autofilter on as it is needed to make other code work. The code I am trying to use is...

View 2 Replies View Related

Summing Variable Values Across Variable Sheets In Multiple Columns

Jun 27, 2014

I need a macro that will create a sheet at the end of the workbook.

Sum data from a variable amount of sheets and display that data on the created sheet.

Here is a step by step:

Starting on sheet 5.

Column D has a variable amount of part numbers in it. These part numbers would be different between the ascending sheets.

Column T, U, V has an inputed number in it that would need added up across all duplicate part numbers in all the sheets.

(Note: The data would also need started on row 4. Everything above row 4 is headers)

Here is a small example:

D E T U V
13019090W Part A1
68705500 Part B1
64202900 Part C-11
59634600 Part D1
26005300W Part E1

I need the macro to start with sheet #5(starting on row 4). Check to see if there is data in column T, U or V. If there is, to create a new sheet at the end. And copy the entire line into that sheet (starting on row 4).

After that, to check every sheet after (excluding the newly created one, starting on row 4) for data in Column T, U and V. And then check for duplicates in Column D on the newly created sheet. If there is a duplicate to add/subtract that number in Column T, U and V to the SUM in column T, U and V in the newly created sheet. If there is no duplicate, to copy the entire line to the new sheet.

So that when finished. On the new sheet, you have the SUM of T, U and V for everything that has data in T, U or V for all of the previous sheets, plus the entire line of the first instance (excluding the first 4 sheets).

View 2 Replies View Related

Excel Repeatedly Shows The Same Name

Oct 14, 2013

I have a problem with my formula. As you can see, i want to get the CIM number of the Team Leaders (TL Name) when i change the dropdown list of the campaign. But what im getting is the repeated CIM numbers.

Here's my formula:

=IF(ISERROR(INDEX('Team Data'!$F$2:$F$5489,SMALL(IF('scorecard (OM Search)'!$C$12='Team Data'!$E$2:$E$5489,ROW('Team Data'!$E$2:$E$5489)-MIN(ROW('Team Data'!$E$2:$E$5489))+1,""),ROW(A1)))),"",INDEX('Team Data'!$F$2:$F$5489,SMALL(IF('scorecard (OM Search)'!$C$12='Team Data'!$E$2:$E$5489,ROW('Team Data'!$E$2:$E$5489)-MIN(ROW('Team Data'!$E$2:$E$5489))+1,""),ROW(A1))))

View 1 Replies View Related

Deleting Chunks Repeatedly

Jan 16, 2008

I need some code that will keep one row, delete 5 or 6 rows keep one row and repeat the process over and over again until the end of the data.

like this:-

1 keep row
2 delete row
3 delete row
4 delete row
5 delete row
6 keep row
7 delete row
8 delete row
and on, and on......

View 9 Replies View Related

Summing 2 Cells (repeatedly)

May 16, 2008

I want to sum two cells, doesn't sound that difficult but I want to be able to change one of the cells over time. Hence, if B1 is the total sum cell, and A1 is what I fill in. B1 starts at 0, and if I fill something in in A1, B1 will sum itself and A1 (Unfortunately this gives me a circular reference).
So what I'm looking for is some way to use paste special automatically in the formula B1 I guess.
It is possible and how?

View 9 Replies View Related

Merge Two Cells Repeatedly, Down A Row For An Entire Tab

Aug 11, 2009

I want to merge two cells repeatedly, down a row for an entire tab. For instance merge A1 and B1, merge A2 and B2, merge A3 and B3 and so on. I feel like there should be an easy way to do this but I cannot figure out a way other than manually going through each row and do not know how to write the macro. Sadly I have about 500 rows in 10 sheets so doing this manually would be.

View 2 Replies View Related

Copy Down Number Of Rows Repeatedly Using VBA

Dec 18, 2009

I have a situation where I want to copy the first 6 rows of data in a worksheet down 11000 times and right below the previous. I can get it to copy down, but I can't keep the formatting the same, and the formatting is important for when I print. After I get this to copy down the values and format, I'll be inserting pagebreaks every 6th line.

I have the following code right now:
Sub PasteDownFormat()
Dim x As Long, i As Long
x = 11000
If x < 1 Then Exit Sub
With Range("a1:l6")
For i = 1 To x
Cells(i * 6 + 1, 1).Resize(.Rows.Count, .Columns.Count).Value = .Value
Next
End With
End Sub

View 3 Replies View Related

How To Extract A String Within Brackets Repeatedly

Dec 11, 2008

I have the following information in a cell. I want to get the exchange:ticker which is inside the brackets to be returned (coma delimited). How can I do this? One thing to note here that the number of companies in the cell can vary

Banco Bilbao Vizcaya Argentaria (CATS:BBVA); Banco Santander, S.A. (CATS:SAN); Banesto Banco Espanol de Credito SA (CATS:BTO); Banco Popular Espanol SA (CATS:POP); Caja de Ahorros y Monte de Piedad de Madrid; La Caixa Group, Asset Management Arm

View 13 Replies View Related

Lookup Or If Function: Find The Room Nights And Net Room Revenue Values For The Specific Rate Code In The "MATRIX" Workbook

Apr 7, 2009

I am having a bit of a problem creating a formula for this report that I have to update every week. I need to be able to find the room nights and net room revenue values for the specific rate code in the "MATRIX" workbook.

On "CURRENT REPORT," I need D4 to pull up the value on "MATRIX" that equals "Room Nights" in column H and "CONABC" in column J. The same thing needs to happen for F4 but with "Net Room Revenue" in column H. The full report has about 500 of these codes in column J, and I need a formula that I can copy easily and will not be affected if codes are added or removed. This is super last minute - I need to finish this report by tomorrow morning, so take a look at the attachments.

View 2 Replies View Related

Looping Code Error: Repeatedly On One Sheet

Apr 22, 2008

I have a peice of code (Below) and instead of going from work sheet 4 to the one in the workbook 2 from the end sheet by sheet running the same bit of code it just loops repeatedly on one sheet??

Sub a()

Dim n As Integer
For n = 4 To ThisWorkbook.Sheets.Count - 2
Columns("W:W").Select
Selection.Copy
Selection.Insert Shift:=xlToRight
Columns("L:L").Select
Selection.Delete Shift:=xlToLeft
Range("L8:L9").Select
Selection.AutoFill Destination:=Range("L8:W9"), Type:=xlFillMonths
Range("L8:W9").Select
Application.CutCopyMode = False
Next n
End Sub

View 9 Replies View Related

Function To Be Added On Timestamp Macro To Align Time Of Users From Different Time Zones

Mar 28, 2014

I am looking for a function to convert time given by my computer (Local time) in EST (Eastern Standard Time). We are several users of a same file (with timestamp macros) and all time need to be aligned to one time zone (EST), even if all users are working in different time zone (EST, CST and IST).

View 1 Replies View Related

Dynamic Sum Function (number Of Sheets Can Vary From Time To Time)

Sep 8, 2009

I need a sum function in A1 of a "Total"-sheet that totals cell A1 in every sheet with a certain color on the tab. The number of sheets can vary from time to time.

Any idea about a dynamic sum function that will do this, in combination with VBA?

View 2 Replies View Related

Count Function :: Vacation, Personal Time, & Sick Time

Nov 17, 2005

I am using the count function for attendance tracking of Vacation, Personal Time, & Sick Time. (Example: = COUNTIF($F6:$CQ6, "V")

I need to be able to do half days. I have tried many different formulas/ways to incorporate the half day scenario even without using the count function with no success.

View 13 Replies View Related

Looking Up 2 Conditions Before Performing Another Task?

Jul 12, 2013

I'm a fairly new user to using VBA and I'm currently running into a little snag. I'm trying tu create userform which will let me know if a person already exists in my sheet by looking up the last name in "A", then looking up his first name in "B", if such entry exists then display a message saying " Yes". If entry user has not been entered in the sheet then use a combox, to select the reason , then choose a date ( i have a working date picker ). Then entry should be entered in sheet (Name, Surname, Reason, date).

Whats working, I can use all of the above to enter all the info into the sheet, what I need to do is verify if user is alread in there, if not, then add it. The so on and so forth

View 3 Replies View Related

Performing Calculations On My Comments!

Feb 26, 2008

i've managed to get a set of cells to show (with comments) what the last weeks data looked like. (so cell value = this week, comment contains last week)

What i now want to do is to use conditional formatting to highlight any major differences between the figures... so:

My comment i'm sure is stored as text in the format:

Previous value was
xxxxx

So the first thing i'd need to do is to to strip out the text at the start, and then perform the calculation.

View 9 Replies View Related







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