How To Add Range From Multiple Sheets With Conditions

Nov 13, 2006

I'm creating a summary sheet that adds up all the data on sheets between start and finish where A2-A25 is SU and B2-B25 is 004*04. Background info: SU stands for SetUp, and 004*04 is a workcenter number (its not 004 times 04) I'm trying to calculate the total number of Setups for each workcenter.

=SUM((start:finish!A2:A25="SU")*(start:finish!B2:B25="004*04"))

gives me a #NAME? error.

Example Data on each spreadsheet:

A B
SU 004*02
SU 004*04
SU 004*04
SU 004*02
SU 004*04

View 9 Replies


ADVERTISEMENT

Nested If Conditions From Multiple Range (sheets)

Jan 29, 2009

I want to auto fill certain columns in sheet A from sheet B & sheet C based on conditions

For Eg:

Sheet A:

Position#

Position Name

Personnel Name

Personnel No.

AB1

Manager

AB2

I want to auto fill in Sheet A for the columns:

Personnel Name
Personnel No.

Conditions:

If the employee is active in Sheet B then fill in Sheet A to the related position No.

Else

If the employee is mapped to org. (Yes) in Sheet C then fill in Sheet A to the related position No.
Else
Vacancy

i have written the below formula but not working properly:

=IF(VLOOKUP(SheetA!A4,Direct!A$2:K$16,5,FALSE)="Active",VLOOKUP(SheetA!A4,Direct!A$2:K$16,3,FALSE),IF(VLOOKUP(SheetA!A2,Contractors!A$2:K$15,5,FALSE)="Yes",VLOOKUP(SheetA!A2,Contractors!A$2:K$15,3,FALSE),"Vacancy"))

View 9 Replies View Related

Count Unique Logs With Multiple Conditions Of Multiple Sheets

Oct 8, 2007

I've got no clue about all this, but I've had to get specific formula examples and fill in the blanks in order for my timesheet to work. There's just one final problem if somebody could please help.

This is a timesheet for a 5 day work week. I need to count the number of unique log numbers for a specific activity. The log numbers counted must be unique across the entire week, not just for each day, which means I want the formula to count the unique log numbers across multiple sheets.

The formula also has multiple conditions. I got 2 columns. The first part of the formula needs to verify a word, say, "split" and if it does it checks the adjacent cell for a unique log number. If both arguments are true, it counts the log as 1 unit.

Here is a working formula for only one page.
=COUNT(IF(D4:D29="split",IF(FREQUENCY(C4:C28,C4:C28)>0,1,)))

Here's 2 problems with this formula:
1. I will count if it encounters a blank cell in the Log numbers the first time (which will happen as not every activity we do has a log#), but it will stop counting if it encounters a second blank cell.

2. I don't know how to make it work across several sheets.

This is an alternate formula which works and skips the blank cells, but I don't know how to add the multiple condition of "split" and to have it work across multiple sheets. I just copied it Microsoft. As I said, I don't understand it, I just fill in the blanks.

SUM(IF(FREQUENCY(IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""), IF(LEN(C4:C29)>0,MATCH(C4:C29,C4:C29,0),""))>0,1))

View 11 Replies View Related

Get Sum Of Range If 3 Conditions Met - Two Sheets

May 15, 2012

How to get the sum of a range if 3 conditions are met.

1 after this date
2 before this date
3 Column G is "OTH"

Ranges are on sheet1
Date reference is on sheet2
range to sum is on sheet1

V14.

Present formula is:
=SUMIF('sheet1'!$P:$P,">="&EOMONTH($A2, -1)+1,'sheet1'!$H:$H)
-SUMIF('sheet1'!$P:$P,">"&EOMONTH($A2,0),'sheet1'!$H:$H)

This works fine but lacks the 3rd condition 'sheet1'!$G:$G ="OTH"

Advise given was to go on SUMPRODUCT but unless with (OFFSET(INDIRECT, SUMPRODUCT wouldn't work on multiple sheets. And this is for version 14...

View 5 Replies View Related

Combine Data From Multiple Sheets With Conditions

Dec 27, 2012

What I would like to do is combine all data (from sheet: Page1,Page2, and Page3) into one sheet named 'Consolidated'. Unfortunately, as you will see from the attached file, my programming and understanding of VBA programming is pretty naive.

What I am after is, when I combine the data, from all sheets into the one, the data should be

1. Automatically Sorted by Patient Name

2. Group, results of the same patient from all sheets one below the other in seperate rows

3. Delete any other rows that may have a patient name and ID, but rest of the rows (New Mole,Clinically Suspicious......Benign Naevus) are blank. (This happens because of the way I have designed my userform. For first visit the details are entered in Page 1, then for second Visit Details are entered in Page2, and for third visit in Page 3. So when I enter the first visit details, the Patient Name and Patient Number are copied into Page 2 and Page 3 even though the other details remain blank. I have done it this way because, if say the Patient comes for visit the second time, the clinician may or may not be aware which visit this would be for the patient. So as soon as they enter patient number, it will give them a message that Patient already exists. So when they click Open Existing Patient Record, the form autopopulates with any notes from their previous visit into the respective page (i.e Page 1,Page 2 or Page 3).

Page 1 (Page 2 and Page 3 are exactly the same)
Patient Name
Patient Number
New Mole
Clinically suspicious
Changed from mapping Photo
Level of Suspicion: Score
Monitor

[code].....

View 3 Replies View Related

Sum Based On Multiple Conditions & Variable Range

May 30, 2008

I have a rolling calendar worksheet that I need to create a formula to auto populate the sum of 8 weeks out, 4 and 8 weeks back based on any work week date I may plug in. So on the "summary page" based on a work week date, I need 8 weeks out, 4 and 8 weeks back projections to be auto summed for 10 different part numbers. The "13 week rolling" page will continue to be updated so that everyweek another week is added and the last week will fall off. (this part can be done manually if no function can delete the oldest column) When the weeks are added it must include the workweek in question. i.e. ww25 = (8weeks out) ww25:ww32 / (4weeks back) ww25:ww22 / (8weeks back) ww25:ww18. see example workbook attached.
This has been driving me nuts for a few weeks now.

View 2 Replies View Related

Excel 2003 :: Formula For Counting Values Across A Range Using Multiple Criteria Across Multiple Sheets

Feb 9, 2014

I have saved this on a 2010 workbook as I am at home but this will be used on a 2003 workbook.

I have several projects on one spreadsheet which multiple users will be working and I am trying to create a summary sheet of the work carried out.

Each user is expected to carry out a task on each row of the data held in each worksheet (research, call, update etc) and each task (Option 1-5) is assigned a value. Each user is expected to meet a certain level of points per day to calculate productivity.

I am looking for a sumproduct along the lines of the summary sheet attached but mine just takes one sheet into consideration and I need one for all sheets.

View 12 Replies View Related

Same Range Name For Multiple Sheets

Jun 4, 2007

My VBA program uses a named range("MyRange") to access data on Sheet1. Next month I want to copy Sheet1 to Sheet2, update the data for the new month and rerun the program. Now, of course, I want "MyRange" to refer to the range on Sheet2 instead of Sheet1. Is this possible to do or do I have to define a new named range each month?

View 5 Replies View Related

Range Check Across Multiple Sheets?

Feb 7, 2012

If I want to check a range of cells how would I modify this to do that?

Single Cell (working):

=IF(AND(Sheet1!T42=Sheet2!J68),"Yes","No")

Range (not working):

=IF(AND(Sheet1!C64:J64=Sheet2!C33:J33),"Yes","No")

View 2 Replies View Related

Using Array Formula With Range Across Multiple Sheets?

Apr 10, 2014

I am currently using the array formula to find out the most recent date a business as referred a deal. I have been using the below array formula to figure this out...

{=MAX(IF((Opps!A:A=[@Company])*(Opps!B:B=[@[Full Name]]),Opps!G:G,0))}

However, we have now have two types of deals. Opps and Suspects. SO now i need to figure out the most recent date from Opps!G:G and Suspects!G:G... regardless of what the deal type is. Hope that makes sense.

Basically i need to have a formula along the same lines as above but MAX date from if conditions from Opps OR conditions from Suspects

View 4 Replies View Related

Copy Range Multiple Times Across Sheets

Mar 31, 2014

I have the following data in one "Project_list" tab:

Project
AAAA
BBBB
CCCC
DDDD

I want to copy this data into another tab "Transpose" in this form:

AAAA
AAAA
AAAA
AAAA
BBBB
BBBB
BBBB
BBBB

[code].....

So basically copying 4 times every row... as simple as that The constraint: I have about 1500+ projects in the project list, but this list can change so i need a statement that copy values 4 times till source tab has empty values. I would like to have in the second column the following serie for each project.

AAAA Q12014
AAAA Q22014
AAAA Q32014
AAAA Q42014

Note- i want to do this in VB not though formulas as i am doing other derivations in macro.

View 4 Replies View Related

2000 Counting Same Range Across Multiple Sheets

Mar 3, 2008

I have been searching the web and wracking my brain trying to do this and now I am here (for one place to start) for help. Especially since I got the formula below from this forum.

1. I have a worksheet with multiple sheets. All the sheets except the last are labeled by department. The last sheet is labeled Totals. All the department sheets follow a template that I don't want to change so any totals or formulas I want to add, I want to do off of the Totals sheet.

2. For an example, I want to total all PCs with the model "Compaq 1.8" from all the sheets onto the Totals sheet. It doesn't seem like Countif can do multiple (or 3d) sheets. It can only do one sheet.

It looks like the only way to do this is to use a UDF (User Defined Function) or some other Function to do this.

I found a UDF that looks like it should work (see below). However, I have tried this function but all I get is the #NAME? error/message. I have tried multiple ways to simplify this function just to test that I can get any data from it but keep coming up with the #NAME? error.


Public Function CntIf3D(rng As Range, V As Variant, ParamArray arglist() As Variant)
Application.Volatile
CntIf3D = 0
For Each arg In arglist
CntIf3D = WorksheetFunction.CountIf(Sheets(arg).Range(rng.Address), V) + CntIf3D
Rem Next
End Function
If I could get the above code to work, It would be nice but I would have to add another department into every total for each new piece of equipment. Some code that would just use the sheet indexes would be nicer, that way any new department inserted before the TOTALS sheet would be automatically added in. Since I can't even get the above code to work, however, I don't want to waste my time trying to test code that would use the indexes.

View 9 Replies View Related

Form Range From Ranges On Multiple Sheets

Jul 20, 2009

Is it possible to form a single Range object from ranges on multiple sheets. So for example, would it be possible to set a Range object equal to cells A1:D146 from Sheet 1 and A1:B49 from Sheet 2 and if so, what would be the syntax? For the first I have:
Sheets("SelectData").Range("A1:D146").SpecialCells(xlCellTypeVisible)
but I wouldn't know how to proceed from there.

View 9 Replies View Related

Find Value On Multiple Sheets & Delete Corresponding Range

Jun 11, 2008

I'm building a course registration workbook and am working on the unregistration macro.

I have a seperate worksheet for each course, labelled by the course code.

There is also a page for each registered participant that shows what courses they're in.

The macro reads off the information on the participants page, and then should goto each registered course's page, look in column C for their name, find it, delete the contents of that row for Columns C to G (has their other information) and then shift all CELLS (not rows) below the now deleted cells up 1 to keep track of the order they were added.

I've tried recording my own macro and editing... but it doesn't work very well for this.
I've also tried searching and come up with nothing, but if someone can look at my code, and/or point me in the right direction, it would be greatly appreciated.

For Each ws In Worksheets
'checks only course sheets that match the courses the individual is registered in.
If ws.Name = unregisterCourse1 Or ws.Name = unregisterCourse2 Or ws.Name = unregisterCourse3 Or ws.Name = unregisterCourse4 Or ws.Name = unregisterCourse5 Then

'Should search for the variable "unRegister" in column C and select it.
Cells.Find(What:=unRegister, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select

'Now needs to select the four cells to the right as well (C:G) and delete them

'Select all cells below from C:G and shift them up one.
End If
Next

View 5 Replies View Related

Copy Range From Multiple Sheets & Paste To Another Workbook

Sep 13, 2007

I am looking for either formula which will allow me to copy data from a workbook with multiple named sheets into a workbook with a single named sheet. For instance workbook 1 has sheets named bob, sue, and tom and there is a workbook 2 which only has sheet bob. I want to copy the range fo data from sheet bob in workbook1 to workbook 2 as long as workbook 2 has sheet bob.

View 2 Replies View Related

Copy Same Range From Multiple Sheets To Master Sheet

Jan 8, 2008

I have multiple sheets (lets say for example a 100 of them) where I need to copy a Value from a fixed location (Col#,Row#) from each of the 100 sheets and store it in a column in a Master sheet.. in the end the Master sheet has only two columns.. first column A contains file name (of the sheet where I copied).. then adjacent column B has the copied value.. in other words the Master sheet will have 100 rows and two columns..for this example..

View 2 Replies View Related

Macro To Copy Range From Multiple Sheets And Paste In New Workbook?

Aug 3, 2012

I have a macro that takes info/data from multiple sheets in the Basin workbook and summarizes it into the Median Database workbook. I need to copy the values in range B5:EM5 in every sheet (each sheet name is site #) in the Basin workbook and paste that range into the median database workbook row with the corresponding site.

Here is what I have so far

VB:
Sub Median_Database()
'This Macro takes the median from each station tab in the current Basin workbook
'And inserts it into the Median Database workbook

[Code]....

how to grab the sheet name and insert it in the median database. The problem is the copy/paste of the range in each sheet. The macro locks up every time.

View 2 Replies View Related

Out Of Range - Copy Cell From Multiple Sheets In New Worksheet Column

Dec 14, 2012

Here's what I'm trying to do (improperly apparently!!):

Book1, ''Master'' is the sheet, I'm copying info into, and Company info are the sheets im getting info from each of my .xls files in a folder, ie cell C2. Just in case, to be clear, I have all my vba projects opened from each .xls book, and need to copy, from each .xls book, in Company info, cell C2 into Master column A:

Sub collate_cell_data()
Dim dest As Range, wbNew As Workbook, wb

Set wbNew = Workbooks.Add

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

View 1 Replies View Related

Add Or Delete Rows From Multiple Sheets Based Table Range

Aug 14, 2009

I have a need to add or delete rows from a number of known sheet names using a table of variables on another sheet that tell me the start row of the sheet I need to go to and the number of rows I need to either add (ie copy rows and paste / insert these) or delete (delete rows).

There are multiple blocks of data I mey need to amend on each sheet and the values in my table of variables will change on each iteration (ie if I delete rows from the first block on a sheet, the start row for the 2nd block I need to amend will need to be updated in the table of variables before I can edit the 2nd block on that sheet).

I have been able to get the process to work for a single instance (ie one sheet and amendments to the first block of that sheet) but I can't figure out how to create the loop to elegantly move to the next set of variables and repeat the process for the 2nd, 3rd, 4th block etc on the first sheet and then move to the 2nd sheet to repeat the process etc.

Public Sub EditCurrentBlock()
Dim rowcount As Integer
Dim startrow As Integer
Dim endrow As Integer
Dim rowcountBal As Integer
'Dim selSheet As Worksheet (tried to use this to nominate the sheet variable but
' had problems so scrapped it)

'Reconfigure the GP Revenue block.................

View 2 Replies View Related

Sum Based Conditions In Different Sheets?

Dec 11, 2012

I'm creating stockportfolio's based upon historical stock data. I have 300 stocks with monthly observations. Stocks are assigned to a portfolio based upon their return in the previous 6 months. I need the top 10% stocks in terms of return in previous 6 months (so 30 stocks) in one portfolio and the lowest 10% stocks in terms of returns in previous 6 months returns (so again 30 stocks) in another portfolio. Each portfolio is just a sum of the returns of the stocks that are in there.

First sheet: rows contain the return a stock had in the 6 months before the month in the left column (so january 2006 contains the return a stock would have had from july2005 -december 2005). This is done for 300 stocks. Second sheet: contains the return the stock had in that actual month (so january 2006 just contains the january 2006 return) The third sheet is where I want to create the decile portfolio's. This means that for every month i am creating 10 portfolio's: Each month "portfolio 1" should contain the sum of the returns of the stocks with the 30 highest returns in the past 6 months. "Portfolio 10" should contain the sum of the returns of the stocks with the 30 lowest pas 6 month returns. (30 is 10% of 300: that's why it is called decile portfolio)

So I should sum things from sheet 2 with the condition referring to sheet 1 where the returns of the past 6 months are displayed. I am trying formula's like =SUMIF(RANK...) but am getting no results. Somehow excel should select the right stocks and sum the 30 returns. I'm totally lost after a lot of trials.

View 1 Replies View Related

Vlookup Across 2 Sheets With Conditions

Apr 12, 2008

I have found that excel can be the best thing ever and also a nightmare when you are stuck on something. I really apprecciat anyone who can help me out.

In an excel workbook i have a sheet that has rows and rows of Sales Leads.

In column A i put a letter "C" if they have turned into a client or an "X" if the sale was not made.

I am looking for a function that will look at column A and when it sees the letter "C" then copy the entire row across and put the row into sheet 2.....

View 9 Replies View Related

Add Sheets Based On Conditions

Dec 29, 2006

i am not able to solve this problem.

1- I have 3 tabs in this worksheet with the data - Tabs A , Master Data and refernce Table

2- Suppose column K in the tab " Master Data " has a record or number, they can be repeated as the new data us added every month.

3- Reference table has the list of the same data record ( numbers ) .

Now the situation is if there is a new record in the column K of the master data sheet the Macro should do the following.

a- Check for the record in the reference table , if doesnt exist then add the record in the reference table

b- create another sheet same as the sheet " A" (duplicate of
A) and name it the new record number

b- Plug the new record number in the cell B2 of the new sheet

c - Copy the row 8 from ( D8 to O8 ) in the new sheet from (D8 to
O8)from sheet A

View 5 Replies View Related

Auto Pick Up Info From Different Sheets By Conditions

Dec 26, 2013

I'll need to pick up the rates from sheets "SYD" & "BNE" by info from column A of "Summary", which means if the info in column A is "sydney", the formula should pick up the rates from sheet "SYD", if it's "brisbane", the formula should pick up the rates from sheet "BNE".Also, the rate should be matched by the column B,C & D from "summary" page.

View 8 Replies View Related

VBA - Collecting Array Of Sheets Based On Conditions

May 11, 2011

I need a code to select sheets with pages less than 15 to print out. Also, a code to print out just the first 5 and last 5 pages if its more than 15 pages.

I've tried this so far but no success:

For X = 1 To Worksheets.Count

If Y Is Nothing Then
Set Y = Sheets(X)
Else
If ExecuteExcel4Macro("Get.Document(50)") < 10 Then
Set Y = Union(Y, Sheets(X))

End If
End If

Next X
Y.Select

View 6 Replies View Related

New Sheets Created With Template And Populated With Data When Conditions Are Met

Mar 24, 2014

I have a workbook with three sheets: Collections, Client and Interest New sheets created from a range in Sheets("Interest"). The range in Sheets("Interest") holds the client names.

Then the template in Sheets("Client") is copied and pasted into the new sheets

For each new sheets cell B6 holds the client name and .Range("A10:A1317") holds the dates
Sheets("Collections").Range("D10:D1317") holds the dates and .Range("D8:WC8") holds the Client Names
if Sheets("Collections").Range("D8:WC8") = new sheet.cells(6, 4) then
if Sheets("Collections").Range("D10:D1317") = new sheet .range("A10:A1317") then
copy the value in Sheets("Collections").Range("D10:WC10").offset(0, 3) to new sheet .Range("C10:C1317")
end if

move down on row and repeat the steps.

View 8 Replies View Related

Remove Multiple Data By Multiple Conditions?

Aug 21, 2009

1. I have 4 columns (let's say D,E,I,J);

D E I J
Account1 Sum1 Account2 Sum2
151 93,79 BF2479 30,00
1476757 93,79 BF7 22,00
BF2479 30,00 151 93,79
86041 84,03 23235 30,00
534 6608,45

2. I need to clean the multiple identical data in the list by both Account no. and Sum (of course the list is much longer!) so that the list should look like this:

D E I J
Account1 Sum1 Account2 Sum2

1476757 93,79 BF7 22,00

86041 84,03 23235 30,00
534 6608,45

I must say that I am a beginner in Excel, so I tried to use this:

=IF(OR(E5=$J$5:$J$430);IF(INDEX($I$5:$I$430;MATCH(E5;$J$5:$J$430;FALSE);1)=D5;"";E5);E5)

for column E, and

=IF(OR(J5=$E$5:$E$452);IF(INDEX($D$5:$D$452;MATCH(J5;$E$5:$E$452;FALSE);1)=I5;"";J5);J5)

(which is reverse of the first one) for column J; (The ranges are the ones used in the real sheet), not for the ones in the example above!); The formula does seem to eliminate a dew unwanted data, but does not give me all the wanted results!

View 4 Replies View Related

How To Satisfy Multiple Conditions Using Multiple Criteria

Oct 16, 2009

I'm trying to divide my data into 6 different groups, based on 2 different criteria. First, I am not sure how to write the logical test to take 2 columns of data into consideration (using "&" and "AND" do not work; I am not sure what else to try), and second I can't figure out how to write the formula so that it can select from 1 of 6 conditions.

So, overall here is what I want:

If DL2=3 and CK2=1, then I want this to be labeled as '1'
If DL2=3 and CK2=2, 2
If DL2=1 and CK2=2, 3
If DL2=2 and CK2=2, 4
If DL2=1 and CK2=1, 5
If DL2=2 and CK2=1, 6

These 6 conditions cover all possible combinations of numbers in the two columns.

View 13 Replies View Related

Named Ranges On Multiple Sheets With The Same Named Range & I Cant Figure Out How To Do This

Jun 2, 2006

I need to create a named range on multiple sheets with the same named range & i cant figure out how to do this. EG :- I want to create a named range called "_SubUnitRows" on sheet1 starting from "A1:A50" & other named range again called "_SubUnitRows" on Sheet2 starting from "A1:A25" ...

View 2 Replies View Related

Select Multiple Sheets And If Value In Cell Is True Then Copy Values In All Sheets And Hardcode Data

Feb 26, 2012

I have a workbook that updates from external source and creates sheets depending on a cell range.

I have put tab 1 and tab 0 on either end of where the new sheets will be inputted, will never know how many sheets

What i need to happen is if someone fills in "complete" in A7 in my "summary" sheet then the values in row 6 in all the other sheets get hardcoded. This needs to happen from A7 down to A26, so A8 = complete then copy row 7 etc
This is what i have so far

I get compile error here ........Sheets(ArrSh(1)).Activate

Also need it to work for all the other rows.

Sub hardcode()
'
'Sheets("Summary"). Select
If Range("a7") = "complete" Then
'
Sheets(Array("1", "0")).Select
Sheets(ArrSh(1)).Activate

[Code] ......

View 2 Replies View Related

Run-time Error '1004' Method 'Add' Of Object ' Sheets' Failed Adding Multiple Sheets

Aug 9, 2007

I have been running a simulation for about 18 hours now and just received:

Run-time error '1004':
Method 'Add' of object ' Sheets' failed

I have been creating new sheets, importing data, pulling some values from the data then deleting the respective sheet. I am using:

ActiveWorkbook.Sheets.Add after:=Sheets(Sheets.Count)

The sheet is actually being added to the workbook, seemingly before the error. I resume the code, and a new sheet is placed in the workbook and it errors again. The Debugger stops and highlights on the code above.The sheet count number was 10895 at the error, just as an indicator of how many times the simulation has performed successfully. I am hoping this is something I can fix without having to start over...

View 9 Replies View Related







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