How To Efficiently Build Criteria Page For Each Of DCOUNTA Cells

Jul 8, 2014

The report that I am trying to build relies on DCOUNTA formulas.

This report has 200 lines and 200 columns approximately. Each of these cells would be a DCOUNTA formula. I have a separate sheet, 'Criteria', where I intend to describe all of my criteria for the DCOUNTA formulas.

My problem is that for each DCOUNTA cell in my report, I have to create 2 rows and 5 columns worth of criteria information... so, for 40,000 cells to populate, I need to create a huge sheet of criteria.

So, while I could do the above, and it would take me some time, more efficient and elegant way to spend my time in order to get this report display DCOUNTA formulas?

For more context, I am trying to present information for 100 individual salespeople, monthly and year to date. For each cell, I need to tell DCOUNTA that the date needs to be comprised in the current period (2 columns), what the name of the salespeople is, and what the nature of the information is, which could be more than 2 additional columns.

I can to some degree autofill most of this, with some OFFSET magic, but its still feels like an ugly way to achieve my objective.

View 9 Replies


ADVERTISEMENT

Coding The Page Setup Efficiently

Mar 7, 2008

I've managed to clean up my code removing all of the selecting to get the macro to run faster but it seems to slow down when it gets to the page setup. Is it because of the ActiveSheet? Is there a better way to code the following?

View 10 Replies View Related

Build Dynamic Named Range From Criteria

Jan 14, 2013

I have some raw data, and in that data are 2 columns. They are Manager and Role. I am trying to create 2 lists, that correspond to their role. I can create a dynamic named range from the column no problem using this formula:

Formula:

[Code] .....

Now, what I need to be able to do is, add a criteria option to the formula. So build the list off of column B, but only if their role (in column C) is Perm, or Temp.

See the attached spreadsheet : dynamic range criteria.xlsx‎

View 8 Replies View Related

Build Average Formula Based On Changing Criteria

Oct 16, 2011

Objective: to create an average variance among exact match RevCode

Example: all RevCodes with "666" should be used to make an average variance statistic

Situation: All RevCode's are not in similar group counts and this creates incorrect averages with a standard formula.

Set of Data

RevCode Observed Expected Variance RevCodeMean
666 200 220 -9.091%
666 205 220 -6.818%
666 207 220 -5.909%
777 500 355 40.845%
767 505 505 0.000%
668 100 105 -4.762%
668 105 105 0.000%

Formula that generates average variance between exact match revenue codes:

=(SUM(B2:B4)-SUM(C2:C4))/SUM(C2:C4)

The solutions can be in VBA or within the spreadsheet either way.

View 1 Replies View Related

Excel 2010 :: Lookup Formula With 2 Criteria To Build Schedule

May 6, 2014

I have a schedule that covers 3 shifts for the entire month. I have another sheet that is used for crew sign in that I want to auto populate with all the people on that shift for that day.

I need to be able to use 2 different cells on the sign in sheet for reference for the formula (one for the day, and the other for the shift. ex. Day 3rd, shift D). I'm wanting to use an array formula to accomplish this. I've uploaded a stripped schedule as this is for the military and can't have any data on it that pertains to what or who it's for.

BTW our current method is to due it manually for every shift for every day that wastes about 12-16 man hours every week. I have excel 2010 at work currently. Access is out of the question and Macro's/vba may or may not work as security is always being increased on our systems so either a single or multiple formula is the route I'm looking to do that will work the the next few years I hope.

View 6 Replies View Related

Formula Conversion To A Less Processor Hungry Alternative Such As DCOUNTA

Jan 26, 2007

An OzGrid member kindly provided this formula from another post I made here:
http://www.ozgrid.com/forum/showthre...837#post326837

= SUMPRODUCT((--(WEEKDAY(Database!$E$7:$E$3973,2)=(ROW()-3))*1)*(Database!$C$7:$C$3973= 'Pattern Analysis'!$A$4)*(Database!$F$7:$F$3973='Pattern Analysis'!C$3))

My problem is that the =SUMPRODUCT is slowing my sheet down considerably and I was wondering if any of you formula whizzes can convert it to a less processor hungry alternative such as DCOUNTA (if that's possible) or suggest a better method.

View 2 Replies View Related

Build List From Common Cells

May 17, 2007

Got something I need to do that I have never done.

I have a column on a worksheet1:
NBC//1
ABC//1
ABC//2
ABC//3
ABC//4
CBS//1
CBS//2

I have a column on another worksheet2:
NBC
ABC
CBS

In the column next to the above on worksheet2, i want to pull the numbers in for that (the numbers are contained in ONE column):
NBC | 1
ABC | 1 2 3 4
CBS | 1 2

Im not sure how to go about this?
In the example I attached, on sheet 2 column B, that is where I want the numbers to build to.

View 9 Replies View Related

Build Tree From Values In Cells On Lists

Aug 1, 2006

I'm trying to write a macro that will build a tree from 3 sets of lists and I'm really stuck!.
The thing is:

1. I have 1 worksheet with 2 sheets. First sheet "Lists" contains in every column a list of data.

2. Range("B:C") contains list od SERVICES1 - every value in list has its corresponding ID_SERVICES.

3. Range("D:F") contains list od SERVICES2 - every value in list has its corresponding ID_SERVICES2 and a parent id ID_SERVICES.

4.Range("H:I") contains list od SERVICES3 - every value in list has its corresponding ID_SERVICES3 and a parent id ID_SERVICES2.

5. Second sheet "Project" in Range("A:C") contain example of tree like: ...

View 3 Replies View Related

Build List Of Cells Meeting Certain Conditions

May 14, 2008

This below code i find out from this form Skip the row find next
but i need it i have column fom c to M
if the cell k valur or j value = 0 or empty skip the enitre row go next row ifthe kvalue <> 0 or <> empty
do something
the below code where do i moify .

Set c = .Find(MyInput, LookIn:=xlValues, SearchOrder:=xlRows)
If Not c Is Nothing Then
Count = Count + 1: ff = c.Address
k = c.Row
Redim Preserve wsName(1 To Count): wsName(Count) = ws.Name
Redim Preserve rng(1 To Count): rng(Count) = c.Address(0, 0)
Do

View 3 Replies View Related

Formula To Combine Cells To Build Email Address

Oct 16, 2008

I have a worksheet with three columns. First Name, Last Name and email address. I need to combine the first name with the last name and add our @ourcompany.com to the end of it for the emaill address.

I've figured out how to do that, but my problem is, we don't use our first and last names in the email address. We use first initial and last name.

I know how to make Tom Jones become tomjones@ourcompany.com

What I need to know is how to make Tom Jones become tjones@ourcompany.com.

Can someone point me in the right direction here? I just need the first initial of the first name and combine that with the last name and then add in the @ourcompany.com.

View 3 Replies View Related

Counting Rows Efficiently?

Apr 14, 2014

I am extracting data from an electronic medical record (EMR) which has many search limitations. I am able to export data into a CSV file (attached) to perform some calculations (All the patient data is fake btw). I am trying to find the number of appointments for each patient within a specific date parameter. For each patient, one appointment appears on one row.

pt appt sample.png

What I want to do is count the number of rows (appointments) for each patient in an efficient manner. Right now I've just used the COUNTA function, but don't want to repeat this for every patient, due to the way that the workbook is set up. The data is all from the CSV file from the EMR; the only column I've added is the "Appointments since 2013" column.

The patient data is fake because I am using a test server for the EMR. However out in a real doctor's office, there will be over 2000 patients with possibly up to about 100+ appointments.

Not sure if there's formula out there that would make my task a lot easier and more efficient, or I need to play around with the columns to set it up differently.

View 6 Replies View Related

Efficiently Deal With #N/A Error

Apr 8, 2008

In the attached work book I have 2 sheets named, Data Entering page-plan and Varaince Summary-in hours.

Data Entering page-plan - is used to enter data
Varaince Summary-in hours. – is used to retrieve data

In ‘Varaince Summary-in hours. sheet in Cell A6 I have a drop down to select the job nos, according to the job no selected date, position no, and milling hours are filtered and displayed. I have written a index/match formula in G6 and have dragged it downwards since I don’t know how many positions would be fetched in each job no selected. Is there any way not to display N/A in unused cells in Column G each time a job no is selected ?( embedding the function in a IF using ISNA or ISERROR would be inefficient as I feel since this sheet is going to house lot of data of about 30 sections, I have shown only one section here)

View 4 Replies View Related

Editing VBA In A Number Of Files Efficiently

May 17, 2014

I have a large number of files that are structurally the same - only the data and the file names are different. I want to insert some code into all of them.

I don't yet know how to open all the VBA pieces together at one time for editing. Is that possible? Otherwise all I know how to do is a manual, file by file, process.

View 9 Replies View Related

Structuring Code To Efficiently Process Data

Aug 23, 2009

I have a two workbooks, one which is a daily schedule and the other is a yearly summary. The worksheet in the yearly summary uses a date in the first column and the daily sheets each have a date on them. I've isolated my data in the daily schedule and I've retrieved the date in its numerical equivilant. I have data that is 6 cells wide by "x" amount deep on any given day. Essentially, I schedule different things to be made and each row has that designation, process, dimensions, quantity, etc.

I want to test the contents of the first cell in the array, copy the pertinent data, switch to the proper worksheet, and paste it into the line where it goes. I believe I need to check a few cells to narrow down exactly which group of cells on which sheet they would be copied to.

I am not trained at all as far as programming goes, but I've been practicing for a few years now. What I am just going to start doing is testing the cells in the rows in the array of data and trying to divide it out that way. This just seems like the long way around.

View 2 Replies View Related

Page Break Preview It Shows The Page Numbers In The Centre Of The Page

Jun 9, 2009

When I view a sheet under Page Break Preview, it shows the Page numbers in the centre of the Page. While I am aware that it would not print the page number I was wondering if there is an option to remove/hide the page numbers.

View 3 Replies View Related

Clear All Criteria In All Autofilters On A Page

May 22, 2009

I have searched these boards (and found wonderful ideas), but can't find a better solution.

Is there a quick way to clear all the autofilters on a page (or all of them in 1 row)?

I am using this code, but it is very slow.

For i = 1 To 21
Selection.autofilter Field:=i
Next i

View 9 Replies View Related

Macro To Move Line To New Page When Criteria Met

Jun 17, 2014

I have been using the below macro that has worked a treat, however I need it to copy as value as when it moves over some of the formulas and links go a little funny.

[Code] ......

What amendment I would make so that it pasted special as value?

View 1 Replies View Related

Macro To Find Criteria And Copy To Next Page

Feb 10, 2014

I am in need of a macro that will:

1. Check cell B1 for my named regions
2. Find all citys in that region from another worksheet
3. Copy the specific details
4. Highlight the information that has just been copied and create a bar chart for comparison

Data to be picked up from "Inc 8%" sheet.

Headings are the same on both the worksheet the information is being taken from and being pasted to.

I need City, Year 1 Turnover - Year 10 Turnover data to be copied.

Region Help.xlsm

View 2 Replies View Related

Print Page Based On Specific Criteria

Nov 10, 2006

I have a report which is split into page sized chunks, in column P I have an identifier Planned, Booked or Running.

Is it possible to build a macro which says something along these lines

If P1 = "RUNNING" Then
Print that Page
Else
Go to P44
If P44 = "Running" Then
Print that page
Else
Go to P87

and so on until the cell selected is blank then stop.

View 5 Replies View Related

Two Page Lookup Matching Criteria Based On Cell Value

May 26, 2009

I have an items list on page 2. On page 1 I want to create a drop down menu in C2 that references the list on page 2. Then when I choose an item, I want the additional information in cells D2 and E2 to come in automatically. The list on page 2 will be expanding daily, and when I expand it I can simply insert a new row so I correctly alphabatize it instead of constantly having to resort it.

With that said....
1. How do you put in the drop down box that references information on a different sheet?

2. What is the best way to reference the information in my ever expanding situation: Index/Match, Vlookup, Lookup, or something I havent mentioned?

View 14 Replies View Related

VBA Macro To Insert Horizontal Page Breaks Based On Criteria Of 1 Column

Jan 10, 2010

I want to achieve is a procedure that inserts horizontal page breaks at certain parts of the sheet where there is a cell equal to 2. Here is the code I have so far.

Sub insert_pagebreak()
Dim printbreak_cell As Range
Dim j As Long
Dim i As Long
ActiveSheet.ResetAllPageBreaks
Set printbreak_cell = Range("AD1")
j = 1
For i = 1 To 100
If printbreak_cell.Value = 2 Then
Set ActiveSheet.HPageBreaks(j).Location = printbreak_cell
j = j + 1
End If
Set printbreak_cell = printbreak_cell.Offset(1, 0)
Next i
End Sub

Everything works until the cell value reaches a 2, and then once it goes into the If statement I get a 'Application-defined or object-defined error' at the below line.

Set ActiveSheet.HPageBreaks(j).Location = printbreak_cell.............

View 3 Replies View Related

Compare Two Cells In A Row With Criteria. Count Rows That Match Criteria

Sep 22, 2009

Here is what I have. 4 Worksheets. The first worksheet is a summary page. I have 350 personnel that are broken down into three different groups. So each group has it's own sheet. Here is what I need to accomplish. Results need to be posted on the summary sheet.

I need to compare cells B2 & D3 for each row on a worksheet and display the number of times they match on a worksheet. For example how many times does EP & EP match on a certain row. I need to compare cells B2 & D3 for each row on a worksheeet and display the number of times they don't match on a worksheet. For example how many times does EP & MP occur. I've attached an example for reference

View 5 Replies View Related

Copying Only Cells With Data To New Page?

Oct 7, 2013

I have line of code that should look bat a given range and copy all visible cells to a new sheet, to start at G8. I get the message that this code doesn't perform this for more than one selection and I'm not sure my code is correct for a rnage that covers two lines either.

VB:
Sheets("Error recommendations").Select
' On Error GoTo Errorhandler ...

View 3 Replies View Related

Referencing Cells By Page Break

Aug 5, 2006

I have a macro that uses subtotals on a dynamic list to generate page breaks by Department. Rows 1:6 of the table are set to print at the top of each page and column A is not set to print at all. Would it be possible to get cell B6 to return the value of the first cell of each page break (from column A) when the page prints. (Column A contains the department names, and though I don't want to print the column itself, I would like the name of each department to appear at the top of the page.)

View 6 Replies View Related

Put In Error Handling In Case The Format Of The Page Changes Or The Internet Page Is Unavailable

May 18, 2006

I have some code that parses an html table. I want to put in error handling in case the format of the page changes or the internet page is unavailable. I am testing without an internet connection and the run time error is not being branched off to the error handler and is fatally ending the macro. This is true also if I raise an error manually.

Private Sub ParseInjuryPage()
On Error Goto ErrorHandl
Dim strPage As String
Dim webIE As SHDocVw.InternetExplorer
Dim myURL As String
Dim tableBeg As Long
Dim tableEnd As Long
Dim RowBeg As Long
Dim rowEnd As Long
Dim cellBeg As Long
Dim cellEnd As Long
Dim strBeg As Long
Dim strEnd As Long
Dim myCell As Range
Dim rowNum As Integer
With Sheets("INJ")
Set myCell = .Range("A2")
.Range("A:F").Value = vbNullString
rowNum = 2
Set webIE = New SHDocVw.InternetExplorer
myURL = "http://www.sportsline.com/nfl/injuries"
webIE.Navigate myURL
Do Until webIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
strPage = webIE.Document.body.innerhtml...................................

View 6 Replies View Related

Can't Move Page Breaks In Page Break Preview

Mar 26, 2006

I suddenly can't adjust my page breaks in any Excel spreadsheet while in Page Break Preview. Is there some option to turn it on and off?

View 7 Replies View Related

Print To Fit All Rows And Column On One Page And Take Up Entire Page?

Oct 16, 2013

I have a sheet that changes the number of columns based on data from other sheets. This is the only sheet in the workbook that I will print out every day. I have it set right now to fit all columns on one page, however sometimes this will result in the bottom 1/3rd of the sheet not being used. If I use fit all rows on one page, then some of the columns will get cut off. Is there a way to scale in both directions? My guess is there is not, but I thought I would ask because it would work great for me if I could.

View 4 Replies View Related

Printing One Page Grayscale And One Page Color With Code

May 21, 2009

I have a report that I use and right now I have a command button that prints the report x2. What I would like to do is to have it print one in color and one in grayscale. I could do this I think with two different buttons, but I would like to utilize just one. I tried creating a macro but it did not pick up the fact that I changed the properties to black and white.

View 2 Replies View Related

Countif Formula: Take Data From One Page And Graph It On Another Page

May 1, 2009

I am looking for a formula that will take data from one page and graph it on another page. The data I am trying to graph is arranged like so:

A B

1 q 2009.05.01
2 w 2009.05.02
3 w 2009.05.01
4 q 2009.05.01

I am looking for something that will look at column A and if the answer is "q" and then look at column B and if the answer is "2009.05.01" Excel will take that and count it in a specific cell on another page. In the case above, I want Excel to give me the answer of "2" in a designated cell.

View 3 Replies View Related

Change Start Page Of Multi Page UserForm

Jul 23, 2006

Is it possible to Change Start Page Of Multi Page UserForm Based on 8 CommandButtons. on a WorkSheet, for example.

CommandButton1
UserForm1.MultiPage1.Value = 0
CommandButton2
UserForm1.MultiPage1.Value = 1
CommandButton3
UserForm1.MultiPage1.Value = 2
CommandButton4
UserForm1.MultiPage1.Value = 3

Could I use 1 multipage UserForm Instead of 8 UserFoms. Is it better to use 1 multipage UserForm with 8 pages or 8 UserForms. I dont know if this make sense or not?

View 2 Replies View Related







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