How would one go about creating a macro that would sum values in column G based on a condition in F ( a "SUMIF" basically) until the end of the range?
The condition would be so that the first blank cell in Column G (starting from column G9 ie Range("G9").End(xlDown).Offset(1,0) would contain the sum of everything above up until the word "Total" (or even the string of 5 characters from the left say "Total") appear in Column F - (the word Total appears a few times in column F, so it should detect the first applicable one)
The idea would be to have this repeated / looped until the end of the data range
Attached is an example and I hope what I have written makes sense
As for the worksheets:
"Final" is what it should look like (Blue Cells represent manual calculations)
"Working" Sheet is where I have it up to now
The sheet "Original" has a button that recreates everything up until where "Working" Sheet is
I have a problem with a very simple Lookup (please see attached). When I copy/drag down the dropdowns in column A and the Lookup formula in column B, the lookup up does not recognise the value in column A till I save the sheet. The same if I select a different value from the dropdown i.e. the lookup only works when I save the sheet. Am using the wrong Function to do this or it something else.
I've uploaded my spreadsheet. I asked my professor if our formula had to take into account whether or not our payment would be changing. As long as I calculated the initial amount - which worked out to be around 30 dollars, I could assume I paid that amount for the entirety.
My latest Mastercard statement shows a balance due of $1,696.96.
Based on recent bills, assume that the minimum payment amount is computed as follows
(balance_owed)*(annual_interest_rate/12) * 2, then rounded to the nearest whole dollar amount.
The minimum payment amount is the amount calculated above or $25.00, whichever is the greater amount.
The annual interest rate for purchases is 11.24%. If I make no more purchases and always pay my bill on time how many years and months will it take be pay it off at the current minimum payment amount each month?
How much total interest would I pay if I repay the loan this way?
What fixed monthly payment amount would pay off the debt in 2 years?
Assume monthly compounding of interest. All calculations are to be done in the Excel worksheet.
The functions NPER() and PMT() will be useful. Note that either the Present Value or Payment amount should be negative (not both) because of conventions concerning the direction of cash flow."
This is part of the bigger excel sheet. I would like to write a macro to find the column D6 based on the location of text 'committed total' . Then addup all numbers from E6 to V6 and write total in W6. Then add d6 and w6 and place it in X6.
I need a formula to sum all E3 cells starting from sheet "Joe" to the last sheet i have, without being obliged to modify the formula for each new sheet i create and which by default is created in the end. something like: =sum(Joe:my last sheet created!E3)
Also,do protected cells in some of the sheets affect this formula calculation?
can i use the countif question to make it count till a particular row based on the value . for instance if i want the countif till value 45 is met i.e i want countif to count till the row where 45 value is housed
I've normally just dynamically selected a range using the xldown feature but because this row contains formula it goes always down to the bottom of the formula instead of the last cell which isn't blank.
How would i go about generating this dynamic range that stops at the first cell that contains no value (but has a formula)? Perhaps a do while loop which looped down until it hit the first blank and then assigned the cells it had looped through as the range?
I have a control chart macro which is being used for patient doses of a medication. Right now my macro automatically fills columns D-N down to row 100. However, I would like it to stop at the last row of data entered in column A. I have attached the code related to the formulae a
VB: Sub autofill() Range("A1").Select Selection.autofill Destination:=Range("A1:A1048576 "), Type:=xlFillDefault End Sub
but i need to select first cell in every 20th column and then execute autofill till the last row that excel provides. I can only do this manually but I have for now 125 columns to fill or to write some monstrous code. Unfortunately I do not have the knowledge to do this in a smart way and I guess there is an elegant way to solve this problem.
Dim MyData As Range Dim MyResult As Range Set MyData = Range("E1:E1000000") Set MyData2 = Range("F1:F1000000") Set MyResult = Range("J4") MyResult.Select Selection.Formula = "=COUNTIFS(" & MyData.Address & ",""=Kim""," & MyData2.Address & ",""=done"" )"
Is there any way I can change the code so that it automatically finds the last cell as Im using Range("E1:E1000000") and Range("F1:F1000000") because there will not be more than 1000000 entries.
I am trying to pull cell values similar to a SUMIF function (SUMIF(range,criteria,sum_range)). For example, in A1 I use a data list created from data elsewhere on the spreadsheet. In the data I created elsewhere, there are 2 columns being used. The 1st column is the information that is being used to create the list and the second column contains specific values (number or text). In the dropdown menu I select an available value (text or number) . When I have selected that value I would like cell A2 to show what the cell directly to the right of it shows from the data I have elsewhere in the spreadsheet as mentioned. I have tried the SUMIF function however it seems to exclude certain values (number or text) and I am not sure what else to use.
I have many kitchens using the same recipes. I need to distill information down until I've got a summary of how much is being made. Uploaded is a condensed version of the point in the process I'm having difficulty with. This workbook will pull information from 8 other workbooks and give me excatly what everyone made on any weekday.
And from there, with the kind help of this forum, I figured out how to do a SUMIF based on the recipe number. And it summed up all instances of 'Recipe X' being used. However, it continues to SUMIF itself all the way down the page... which is good, because of how recipes are chosen for each kitchen. However, I only need to report one instance of each recipe.
In the uploaded example (and I apologize for the colorful sheet, but it helped me double check what I was working on.) ... I only need to report the PURPLE results elsewhere... the first instance of each SUMIF.
I have an excel sheet wherin there is a column that has the data where in the dates are displayed and many other columns.
I get this excel every Thursday so i want to filter this date column in such a way that it give me the data related to the date of the previous week only yet there is a catch here. When i say previous week i mean.
Suppose today is 03/14/14 then i want the data from 03/07/14 till today ie Last week friday to this week full( so cant use Current week option) and then paste it in a new sheet.
I tried the Record part but in that it is taking a hard coded value as i am selecting the date myself. I dont want to change the date manually every time.
With Sheets("regrade pharm_standalone") For Each r In .Range("standaloneTerritory") If r.Value = "X101" Then r.EntireRow.Copy Sheets("X101").Range("A1").End(xlDown).Offset(1).PasteSpecial xlPasteValues End If Next r End With ------------------- I need to repeat this loop for values from X101 to X151. In all cases, the sheet name is equal to the value I'm looking up (eg: value = X102 goes to sheet X102).
I have a named range called 'territories' that contains the list of X101 -> X152.
I'm hoping to make the code perform the loop for each of the territories without my having to copy & paste and change the 'X101' 51 times as this would seem a rather silly thing to do!
Macro which loops through a number of files and calls the same macro in each of them. Unfortunately when I add "Application.Run..." to the code, it no longer loops through the process and instead stops after updating the first file in the loop. If I remove the "Application.Run..." code and add any other code, the loop works fine and it continues through the process repeating all the steps for each file found.
Why it stops after one file when using "Application.Run..." to call the macros?
NB I have a list of path and file names starting in row 8 of columns A and C. Each file in the list has a macro called UpdateS1 and promoupdate1.
Sub C_Run_Loop_Macro() Dim lastRow As Long Dim i As Long
I have working code that returns a row number within a for loop based on parameters I set.
Each time the for loop runs I would like to store this row number, then after the loop has finished, delete all stored rows.
Code: for rowNum = 1 to x (some variable end row number which I already have worked out using End(xlUp).Row) if x = y then *storedRow = rowNum end if next rowNum *
Lines with a * are the bits I can't work out. I've been trying to understand arrays by reading posts on what other people have done, but I can't fit (or fully understand) the reDims, or reDim preserves into my code. I've seen what appear to be quite complex ways involving uBounds and LBounds, but unfortunately I can't see how to use them.
All I want is to simply keep adding a row numbers to a variable, (i.e. row 2, 5, 20, 33, 120, etc) and then delete those specific rows.