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


ADVERTISEMENT

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 View Related

Nested If's Or How To Check Multiple Conditions In A Row

Jul 14, 2009

I have the data in this form

YYY
NYY
NYY
NNY
NYY
NNY
NYY
NYY
NYY
NYY
YNN
NNY
NNN
NYY

The output should check two conditions. If all three columns are "Y" then it should return value "Y". If any two columns are "Y" then it should return value "Y". or else it should return "N". Then the output should look like this.... The output column is colored in Red..........

View 5 Replies View Related

Multiple Conditions In Nested IF Statements

Apr 9, 2009

I've been using nested IF statements, with success for a while, but now I'm into my fourth nested statement I'm starting to get some problems.

=IF($P15>0,SUM(IF(APR09!$M$2:$M$500=Department!$M$1,IF(APR09!$B$2:$B$500=$Q$6,IF((AND(APR09!$G$2:$G$ 500<>Department!$N$29,APR09!$G$2:$G$500<>Department!$N$30)),1,0),$N$2))))

Is what I've come up with so far. However, this returns 0, even though there are 3 items which should resolve the criteria. The main problem is here: IF((AND(APR09!$G$2:$G$500<>Department!$N$29,APR09!$G$2:$G$500<>Department!$N$30))

Where I am trying to make the sum increase by 1 if the cell from the row in question, having made it through the first 3 IF statements is not equal to either of those two cells (a range would be better) then the Sum needs to be increased by 1.

View 3 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

Countif Nested Conditions

Aug 28, 2007

I just need it to be able to test two seperate conditions on two seperate columns but i cant work out how its done

for example, i have two columns on a sheet, one called type and one area, both are text, i need to count how many items of one type are in a particular area. so if i have two columns "area" and "type" i want a total count of how many rows contain area="north" and type="b"

View 13 Replies View Related

Write A Nested If Formula With Special Conditions

Aug 16, 2009

I thought that a nested if is what I needed, but now I don't know what I need I have explained in greater detail within my sample that's attached. Quote:....

I don't know how to write a function for what I need. Right now I have a function that says '= if $b7=0,0,if($d7>$d5,-1,1)), but I've found a problem. If there's more than one zero it throws off what I'm doing. I need a function that will ignore any zeros within column D and use the second to last number. For example:

The formula in E12 should read '=if($B12=0,0,if($D12>$D8,-1,1))
The formula in E13 should read '=if($b13=0,0,if($D13>$D9,-1,1))
The formula in E20 should read '=if($b20=0,0 ,if($d20>$d12,-1,1))

I just don't know how to write this so that it will go back to the second to last number other than zero.

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

Nested Vlookup With If Statement: Match Up Two Sheets

May 19, 2009

I am trying to match up two sheets and I the match criteria is based on the data from columns B, C, D, E, and G. Sheet 1 contains ~20,000 line items of data. Sheet 2 contains ~250 line items. I am comparing the info in sheet2 vs. the data in sheet1. Both sheets are formatted the same.

For each row in sheet2, I need to compare against all rows in sheet1. For example; for the first row in sheet2, determine if there is a row in sheet1 that contains the exact same data for columns B, D, E, and G (all must be true) and the data in column C is False. Examples:

View 2 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

Row Nested If With Multiple Cells?

Aug 20, 2013

Is there a way on excel to produce a nested IF that says when 3 cells out of a row of 26 cell exceeds 100, then 'issue' is shown? So far I have the worksheet set up using:

'=IF(OR(C5=$C$2,D5=$D$2,E5=$E$2,F5=$F$2,G5=$G$2, H5=$H$2,I5=$I$2,J5=$J$2,K5=$K$2,L5=$L$2,M5=$M$2,N5=$N$2, O5=$O$2,P5=$P$2,Q5=$Q$2,R5=$R$2,S5=$S$2,T5=$T$2,U5=$U$2, V5=$V$2,W5=$W$2,X5=$X$2,Y5=$Y$2,Z5=$Z$2 ),"Nusiance","No Issue")'

Which is each single cell in the row, but I'd like to go a step further for it to be if any 3 of these calls exceeds 100, then nuisance or no issue is shown and not just if one single cell exceeds it.

View 1 Replies View Related

Nested IF (score Range)

Mar 11, 2009

If Average Score is:Then return:
Greater than 89A
From 80 to 89B
From 70 to 79C
From 60 to 69D
Less than 60F

Student's Average Score
90
52
75
88
82
53
46
72
99
100
42
53
69
79
84

=IF(A9:A23>89,"A",IF(A9:A23<=89,"B",IF(A9:A23<=79,"C",IF(A9:A23<=69,"D",IF(A9:A23<60,"F")))))


A9:A23 is student's score range

I am getting the correct answer for the first one only...all others are coming back incorrect. I have been working on this one problem for over 3 hours.

View 3 Replies View Related

Nested If Statement Within Range

Apr 7, 2009

I dont know how to nest and if (if that is the right way to go about it). this is what I have ....

View 10 Replies View Related







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