I am tryin to sum up the range if the given coditions are met. But unfortunately it aint working properly. It is basically summing up the entire range.
Sub SysDown()
Dim Count As Long
Dim Rowend As Long
Dim Total As String
Count = 2
Rowend = 2
While Cells(Rowend, 3) ""
Rowend = Rowend + 1
Wend
Total = 0
While Count
In the attached Exel work book I have work sheets named
Material Usage – Usage of materials Estimate - calculate the Total material cost for a job Material Cost – defines the material cost for each material type
In “Estimate” worksheet Job number is repeated but sub jobs falling under a particular job number is unique. Materials used for each sub job is different.
Once the job number is selected from the list box , I need to calculate the total material cost for each job. I tried sumif function but I don’t know how to get it to look up for each material type and get the sum .
I want to calculate the average of a range...if it meets a certain text criteria.
For example, if the product is a "Course", then take the average of pages all those courses together.
ProductNumber of PagesExam316Course46Exam232Course32Exam245Course53Exam155Course246Exam118Course154Exam82Course434Exam80Average # of Pages for Courses = Average # of Pages for Exams =
I am having problems getting a formula to calculate the max if it meets 2 criteria. MAX of time listed by 1/past a certain date. 2/are of a specific client.
Here is my formula... {=MAX(IF(All_Tickets_07012014!$D$2:$D$155685>1/1/2014,IF(All_Tickets_07012014!$O$2:$O$155685=$A2,All_Tickets_07012014!$G$2:$G$155685)))}
The data... $D$2:$D$155685 - is the list of dates per ticket. $O$2:$O$155685=$A2 - Are a variety of clients, where $A2 is a name of one of the clients. $G$2:$G$155685 - Being a range of time stamps.
The formula runs, however it only shows the MAX of all entries, not within the specific date range...
In theory I know what I should do, but I don't know the syntax. So here it is:
There are 1450 unique records in my XLS, every record contains 45 different rows(these are the phases) with their position(1....45). Every row has a status (Not Started, In Progress, Complete)
COLA(uniqueid)....COLi(it is a number, it is the position).....COLN(status)
basically I would like to get the last "in progress", If not found, the last "Complete, If not found then the first "Not Started". and put a "Y" right next to the row to a new column for all the groups(45 rows)
s/s has 325501 rows. Column C contains names of people (whether present or not -I enclose small attachment to illustrate). Column J contains scores (if present). I need column N to list the last row number where each column C name scored points (not just when heshe was last present). I think I need macros which I can fill down both columns (??).
Suppose I have some data with a code for each data point: 1 100 1 200 1 300 2 400 2 500 3 600
The first column is the code and the second is the data. I can use a SUMIF statement to sum all the data that have a certain code (like 1). What if I wanted to sum all data that meets one of a number of codes? Suppose I wanted to sum all data that meets 1 or 2. I know I can do this with 2 separate SUMIFs, but I was wondering if there was a way to do it with one.
I want to sum certain data, which meets two conditions.
My data set contains three columns and a lot of rows. The columns are the following: PostalCodeDeparture PostalCodeArrival PassengersInCar
I want to sum the total number of passengers with departure postal code 5100 and arrival postal code 5110. (and I want to do the same for all other postal code combinations in the data set)
I know if I use dmax for only where first column equals 13 I get 460 but how do I get the second highest value for only those rows that have 13 in the first column (expect the answer to be 268). Then I want to do the same for 3rd, 4th highest etc. I know large does it for one column and not only when the first column matches a designated criteria.
formula to find the last number in a cell and if that number meets a condition put a letter in the adjacent cell.
In cell A1 I have numbers as such 254671 (these numbers vary in length but not normally more than 8 in length). I want to know if the last numeral on the right is a 1 and if so then enter in the adjacent cell (B1) the letter y if not then leave blank.
i am trying to get my excel formula to say if 2 date ranges in my excel workbook are the same (in seperate worksheets) to put a value from a certain cell into another cell in another worksheet. This is all in the same excel application...
The first step i have taken are:
1) if the 2 date ranges are the same to say 'true' if not 'false'
I am trying to get a forumula to say "if it is true to put a value from a different cell into another cell (both in different worksheets) but the same excel application...? but if its false to move on to the next date
I want to create a sumif formula that will sum the data if it meets five different criteria. I tied to do an “Or” statement in the formula, but it doesn’t work. For example, I want to sum all the rows that contain: Apples, Bananas, Cherries, Pears, and Plums. How do I write the sumif formula so that it will do this?
I have a spreadsheet with about 225 sheets or so containing data. The date is in column J. I am needing to delete all the Rows that have a date greater than or equal to 06/06/08 and loop through all of the sheets.
I recorded a macro to find the date 6/6/2008, then highlight the row, then select the next 450 rows and delete them and it worked ok, but I don't know how to get it to loop through the sheets to the end.
I am trying to write a macro which will autofill specific columns. The macro will set the range from the start of my autofill to the end of my autofill as a constant range.
The problem I need to get around is the end of my range can always change each time I run the macro. For instance, the first time I run the macro I may only need to autofill from row 4 to row 15. The next time, I may only need to autofill from row 4 to 23 (because of user updates). How can I make the end of my range not be a constant address but variable?
I have gotten a code. It goes into Sheet 1 and picks up all the Rows (entire row) in which Column A = 1.
Instead of copying the entire row, I need to just copy the row but only specific columns (i.e. Row 2, Column B,C,D,E,G).
Is there a way to specify where it pastes values in Sheet 2 (say from column D) because Column A-C have pre-filled data which do not change. And when it pastes, it has no gaps (despite a gap in the copied columns (i.e. Column F in sheet 1 was skipped)).
VB: Sub cond_copy() 'assuming the data is in sheet1 Sheets("Sheet1").Select Sheet2.Range("A2:G5000").ClearContents
IN column J(on sheet 1) i want it to return text (OB) if Sheet 1 column A1 equals Sheet2 Columns A1:A500. And if Sheet 1 column A1 do not equal Sheet2 Columns A1:A500 return text(IB).
I'm working with wookbooks used company wide and I cannot add any helper columns which would solve the problem. I need to add data which meets certain conditions see attached workbook for a sample.
I am trying to add the tuition to be reimbursed if the claim date is on or after a certain date and then deducting the total from a set amount. I have included a simple example. I tried a formula from the pierson examples but Im doing something wrong.
I am trying to come up with a simple formula to count a single cell if it contains either a 2 or 3.
The cell can contain numbers ranging from 0-8.
Even better would be if I could some how evaluate single cells based on the contents and then count the number of cells where the criteria for contents is true. The problem is the criteria differs from cell to cell (i.e. D2 could = 2 or 3, but E2 needs to be counted only if it contains a 4 or 5).
I know COUNTIFS only evaluate a range but it would be perfect if I could somehow get it to work for single cells. COUNTIFS(D2,2,D2,3,E2,3,E2,4,F2,2)
I am trying to create a macro to accomplish the following task. Delete if the value belongs to queue "ab cd ef" and is also a part of category "xxx xxx".
I wrote the following code, but it seems it is doing some mistake:
Code: LastRow = Range("Z2").End(xlDown).Row For i = 2 To LastRow tempQueue = Range("C" & i).Value tempRange = Range("Z" & i).Value If (tempQueue = "ab cd ef" And tempRange = "0 - 1 day") Then Range("C" & i).EntireRow.Delete
[Code] ........
The above code works fine but it deletes only 120 rows out of 200 or sometimes 150 out of 200. Can't get it to work all 200 rows.
Say I have a column of cells filled with numbers that are ascending. What I would like to do is to pick out the first cell that meets my condition. For instance, these cells contain irrational numbers that increase from 0 to 100. I would like a formula to pick out the first cell that exceeds 10.2, and to return the row number of that cell.
In the case of descending numbers, if I would like to pick out the first cell that goes below 10.2, would the formula be the same?
Is it posssible to use the xirr function with conditions. For example, an array formula that will only calculate xirr if a column meets a certain criteria or if the dates are within a range?
I currently have a report that I have code on that will change the color of a cell based on whats in the cell.( Code posted below) However I also need to look at $J and if the first letter of the value in that column is a "z" then I would like to change that whole row to icolor 13 (purple).
For example J14 might be "Z-Thomas". if it does I would like that row 14 to change to purple.
Also I would prefer that the solution be in VB, so that we do not have to do something in VB with the fix below AND do something in Conditional Formatting.
Private Sub Worksheet_Change(ByVal Target As Range) Dim icolor As Integer
If Not Intersect(Target, Range("$A:$E")) Is Nothing Then Select Case Target Case "y", "Y" icolor = 4 Case "n", "N" icolor = 3 Case "?" icolor = 6
I'm setting up a spreadsheet for work and i have a question. I'm not familiar with the formulas. If i want to set up a formula to where if i type "complete" in the cell it will move the entire row over to the next sheet.
I'm trying to Multi-Select rows in order to format all rows, in "One Step" if the cell in col. "A" = 1. I managed to write the hereunder code but I'm still frastrating because I don't like the first RNG setting command. How can I avoid declaring RNG as row(1) and still be able to run the code. I assume I need some other Range set for RNG which, unfortunately, I could'nt find and the command I used includes row1 in RNG although cell A1 = 5.
Sub Conditional_Multi_Rows_Select() Set RNG = Rows(1) ' this is my problem LR = [A65536].End(xlUp).Row For R = 1 To LR If Cells(R, 1) = 1 Then Cells(R, 1).EntireRow.Select Set RNG = Union(RNG, Selection) End If Next RNG.Select Selection.Font.Bold = True Selection.Font.ColorIndex = 3 End Sub
I had in mind to use:
Set RNG = Rows(65536) but this will not make it a "neat" vba code, either.
I have 2 sheets, sheet1 and sheet2. On sheet1 I have a cell (w,3) which displays either "OK" or "Needed". It will be like this for every row on the sheet. On sheet2 I have more information. I have been trying to create a macro or VB function that everytime the workbook is opened will scan the entire column W for any that say "needed" and if/when one is found copy the data in the cell in column A of the same row from sheet1 to column A of the first blank row in sheet2.
So say cell w,6 displays "needed", I then want to have cell a,6 copied from sheet1 to sheet2 into the first column A that is blank. I don't really care if when w,6 changes to "OK" it removes the entry on sheet2 or not, in fact if it does that would be great.
Here is the code that seems to be not so complicated and has copied information from one sheet to another, can't get it to work consistantly. I copied it off a similar post on this site and am not sure what the last value = "1" is doing but I doubt its helping my cause. The cell I need to trigger the action is in the 23 column, the cell I need copied is always in the first and the cell I need it to be copied into on the 2nd sheet is always in the first column as well. I'm pretty good with regular logical statements but I feel that a lack of knowledge about all the available commands is really whats hurting me on this....