Sum If Satifies Two Requirements

Oct 19, 2009

Need to summing a column if it meets two requirements. First it has to be (column A)type1 A and (column B)type2 W. if type1 and type2 are true, sum column C. I also attached a file that explains what i'm looking for.

View 5 Replies


ADVERTISEMENT

Shading Cells Given Certain Requirements?

Aug 6, 2012

The logic is that I want the cells to be highlighted and have a border drawn for them as shown in the attached sheets (I have used record macro which will do this for rows 39 and 40 when the click button is clicked). The highlighting should start at the row number specified, stop once a merged cell is reached, skip the merged cell, continue highlighting, stop once a merged cell is reached, skip the merged cell, continue highlighting and so on and on until the last row (which is user specified) is reached. The first row after the merge cells should be highlighted in grey and yellow.

View 9 Replies View Related

Bar Charts Generate With Some Requirements

Jan 5, 2014

What is my requirements in the attached snapshot and excel file .

Please check the attachment. Charts.JPG

View 1 Replies View Related

VLOOKUP With Two Match Requirements

Dec 23, 2008

In Column A I have vessel departure dates
In Column B I have Final Destinations
In Column D I have vessel arrival dates

I am trying to get the result of column D based on matching A & B information. My dilemma is that if I have vessels with the same departure dates going to different destinations how can I retrieve the arrival date? I've been trying "vlookup" and "index/match" to no avail.

View 4 Replies View Related

Counting With Variable Requirements

Feb 5, 2010

I've been asked to produce a spreadsheet that monitors the time it takes to answer queries from partner companies. Ive attached some of the spread sheet that im struggling to work out. I would like a formula that will total the number of days it takes us to answer the queries per month for each company.

Example - For January
Compnay A 8 Days
Company B 7 Days
Company C 13 Days

View 3 Replies View Related

Count Function To Comply With Two Requirements

Nov 11, 2009

I have a database where I need to count the qty of such item but it has to comply with two requirements. It will count only those that are similar to one of the cells but if the number is the same, not taking in count.

Example:

ItemLiablibity354A354A543A345A567A456B567B

So, I want to count all the items but only the one that matches the A on the column "Liability" but if it is repeated, not counted.

so the resul must be: 4 as one number is repeated.

View 9 Replies View Related

Formula To Include Multiple Requirements In Different Cells

Aug 30, 2013

I would like a cell to show either OK or No depending on the requirements of three other cells as below

G4 is the cell to show a value. For OK a date in G6 must be more than todays date, a tick must be in F6 and a date in D6 must also be more than todays date.

I can get G4 to do each section individually i.e. (A4 has todays date in it, updating automaticaly)

=IF((G6+365)

View 2 Replies View Related

Calculating Current Cover Based On Forward Requirements

Nov 17, 2007

I have drawn up a simple summary to show what I am trying to achieve: ...

View 9 Replies View Related

Copy Data To Multiple Sheets (Specific Requirements)

Jun 30, 2006

I am trying to create a macro that will copy data from one sheet to four other sheets depending on some requirments in the data. I have a main worksheet that will store the data, the name on this sheet will change daily, so you cannot use a "named" sheet in your macro. The other three names of the sheets are "Esky", "Indy", "Gfld", and "Other". When copying the data, I need to copy the entire row of data to the required sheet. The data comes in such as:

MZ03948 134 126.23
PZ34533 128 12.28
IM04985 630 198.50
Z109384 40 35.65
2130494 76 12.28
2236326 12 45.63
5123132 12 12.23

Based on the FIRST TWO characters in the first column, I need to copy the data to the specific sheet. I would assume a simple LEFT() function would work for this. Here are the requirments for each sheet:

Esky - "MZ" or "51"
Indy - "IZ" or "Z" or "21"
Gfld - "PZ" or "22"
Other - Anything else

View 9 Replies View Related

Excel 2010 :: ODBC Connection String With Multiple Variable (WHERE) Requirements

Dec 29, 2013

With VBA in Excel 2010 I am connecting to a SQL server by using ODBC.

This is a two part process:

Part one:I have created a connection string that gets me the following data: A, B, C, D, E from sheet tpoPurchOrder Where B is equal to "1" And Where C is equal to a changing field under Sheets("Macros").Range("B2")

Here is part one

Code:

Sub Part1()
Sheets("Open PO by Vendor").Select
Sheets("Open PO by Vendor").Cells.Clear
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
"ODBC;DSN=Connection;Description=Description;UID=USER;PWD=PASSWORD;APP=Microsoft Office 2010;WSID=Workstation;DATABASE=Database" _
, Destination:=Range("$A$1")).QueryTable

[code]...

Part one works perfectly.

Part two is where I have problems.Part two is a little different because I have the same connection, but what changes is the table that I am looking at "tpoPOLine" instead of "tpoPurchOrder" and the where is now going to have a variable number of commands.

I want part two to be depend on part one. Under part one I want the result from column E to be a where statement in part two.

As follows:

In particular: *E3 from Part 1*, etc.

Code:
"SELECT tpoPOLine.Status, tpoPOLine.POKey, tpoPOLine.ItemKey, tpoPOLine.POLineNo, tpoPOLine.UnitCost, tpoPOLine.ExtAmt" & Chr(13) & "" & Chr(10) & "FROM mas500_DII_app.dbo.tpoPOLine tpoPOLine" & Chr(13) & "" & Chr(10) & "WHERE (tpoPOLine.POKey=*E2 from Part 1*) OR (" _
, _
"tpoPOLine.POKey=*E3 from Part 1* ) OR (tpoPOLine.POKey=*E4 from Part 1*)" & Chr(13) & "" & Chr(10) & "ORDER BY tpoPOLine.POKey" _
)

Now my problem is that sometimes the E column from part one ends up being 1 row, sometimes it ends up being 50 rows. I would like the code to change accordingly.

1. Pull everything from the SQL server filter once in excel. This is not as efficient as the database has ~300,000 rows in the tpoPOline table and would take a lot longer then needed.

2. Create a nested if table and

Change

Code:
WHERE (tpoPOLine.POKey=*E2 from Part 1*) OR (tpoPOLine.POKey=*E3 from Part 1* ) OR (tpoPOLine.POKey=*E4 from Part 1*)"

to the value of that nested if table

The nested if table would be something like =if(isblank(E2),"E1",if(isblank(E3)... etc for ~50 rows. I know the syntax is incorrect but you get my point.

3. Rerun the query for each value in column E. That would require the connection to happen ~50 times which would not be that great, as well as I would have to copy and paste the data after each run as the tables cannot overlap.

What I am looking for is a way to run this only once, on one sheet, without writing a nested if table with 50 if's.

View 5 Replies View Related

Macro To Copy Data From One Cell To Another If Adjacent Cell Meets Certain Requirements?

Feb 19, 2014

Basically I have three columns in a work Sheet F, G, & H. F is empty, G contains text and column H has both text and numbers.

I want to be able to automatically copy the value from Cell H to Cell F if cell G contains the word cost.

I would also like to delete all rows where Column G & H contain two dashes -

View 7 Replies View Related

LOOKUP With AND Requirements (lookup A Particular Student's Grade In A Particular Assignment)

Jan 26, 2010

I'm making my own gradebook (attached) and one of my sheets will list scores for each student in different assignments. I have one sheet which keeps track of all students and all assignments with other info. I would like to program cells in one sheet (the third in the attached file) to lookup a particular student's grade in a particular assignment. I figured trying a LOOKUP with an AND requirement might work but it keeps returning the message "could not find value".

My formula references the student's name and the assignment from the identifying cells so that it is easy to copy and paste. I wondered if it was this which resulted in the error, but doubt it.

View 4 Replies View Related

Linking Partial Data From One Cell If Data In Another Cell Meets Requirements

Jan 6, 2009

The merged Cell B6:G6 will receive a ten-digit number followed by a dash and then one or more numbers. (For example: 1234567890-123)

Cell B15 will then receive data shortly afterwards. I already have a validation macro for this cell which allows either 'I' or 'I I I'.

Upon exiting Cell B15, merged Cell B16:H16 needs a macro which will check Cell B15 and if it contains 'I', Cell B16:H16 will display the data from the ten-digit number entered in Cell B6:G6 minus the first five digits. (For example: 67890-123)

Now the data in Cell B16:H16 can only be somewhat editable hereafter. It can be erased or replaced with numbers in smaller or greater digit combinations than five before the dash (i.e. 67890-123 can be replaced with 123456-7), and digits can be added after the whole group (i.e. 67890-123 & SEE DWG) without any error messages. But if any five-digit number with a dash and some numbers exist in Cell B16:H16, they must correspond with the number in Cell B6:G6 minus the first five digits.

However, if Cell B15 ever receives a 'I I I' afterwards, all data in Cell B16:H16 must be erased. Cell B16:H16 can never contain data if Cell B15 contains 'I I I'.

Also, if the data in Cell B6:G6 changes later on, the corresponding digits in Cell B16:H16 must change as well, even if there are digits after the whole group.

So here is an example of what a good macro would do for me: ...

View 14 Replies View Related







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