Set A Range For Multiple Functions/Editing Help
Jul 31, 2009
Is there a way to SET a RANGE that can be used for further editing without the need to specify the range each time for each function to be perfomed?
I have a pile of Data, with a Calendar date and 4 columns of data for each date.
I want to make a summary for each year separately of one column of data (Total PL). How can I set a condtion that it will output a summary of data for a given year, e.g. 1990?
Even more useful might be setting up a table for each year, where I will be able to perform easy function like SUM, MAX, MIN but it will use data only from the specific Year in each row.
- Is there a way to make it simpler, but not having to specify the RANGE for each Year for each Function?
View 9 Replies
ADVERTISEMENT
Jul 15, 2009
So I am attempting to run a macro that contains some if then statements that will change the text in a cell given certain circumstances. I am having an issue specifying the range in that it begins in cell A2 and it goes to the last data cell in the sheet and no farther. The issue with just selecting a whole column is that if the a cell is blank, it fills it in with no and it leaves me with 65,xxx nos in column A. Attached is the workbook with the sheet the code would be executed on and hopefully what the solution would look like. Also i have attached the troublesome macro I have written.
View 7 Replies
View Related
Apr 19, 2007
I have 150 or so workbooks. Each of them are in the same format. I need to edit this format. Bolding, Borders ect. I know you can do this with multiple worksheets but how can do do with with multiple workbooks?
View 12 Replies
View Related
Nov 29, 2012
I am attempting to print each letter of a string in a specified cell individually in different cells. For example, if I input the word "Hello" in cell B1, it would automatically print "H" in A1, "e" in A2, "l" in A3, etc.
I currently have this;
VB:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Count As Integer
Dim Explosion As Integer
Dim Kaboom
Dim EndCounter As Integer
Dim StrTarg
Dim PLV
[Code]...
However, it does not seem to loop. It simply prints the first letter of the string inputed (In cell K3 in my case), into cell A1, and then stops. Surely it should continue to loop around untill Count is equal to the length of the string in K2.
View 4 Replies
View Related
Dec 5, 2007
Running excel 2002, windows vista (some machines on network are running xp). I have a spreadsheet that I want to be able to edit from all computers on the network so that it shows real time changes on all PC's.
It would be like using google docs, I can't use google docs because my file size is 2.5MB and it is too much for it.
View 5 Replies
View Related
Aug 6, 2009
i have a list of about 20,000 phone numbers that I need to edit.
all start
01 123456
01 123457
01 123458 etc
I am trying to create a macro that will change them to
+001123456
+001123457
+001123458 Etc
However, no matter what I try it always comes out as
+001123456
+001123456
+001123456
F2 Copy and paste is going to take me forever, and I am sure that there must be a quicker way to do this.
this is my first time creating macros so am completly lost.
I want to keep the text that is in the cell that I am editing, just add the country code and delete the space.
View 9 Replies
View Related
Sep 3, 2008
I have the following code that Ger Plante very kindly helped me with which, depending on whether there is an 'x' by someone's name in a list, creates a new workbook, copies some information to it and saves it before moving on to the next 'x'. Loop Through Rows & Copy Each Row To New Workbook
For lLoop = 2 To 251 'first row of data to last row.
If ws1.Cells(lLoop, 4).Value = "x" Then '4 = Column D
ws1.Activate
ws1.Range("e" & lLoop & ":g" & lLoop).Copy
ws1.Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Rng1.Copy
Workbooks.Add
ActiveSheet.Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
ActiveSheet.Range("A1").Select
ActiveSheet.SaveAs varPath & "Student Data Files" & ActiveSheet.Range("B1") & ".xls"
ActiveWorkbook.Close
Else
End If
Next lLoop
how I can modify the code such that any cells in the range "b1:b504" in Sheet1 of the the new workbook can't be selected or edited without a password....I have tried unsuccessfully using Protect but am not sure how to get vba to set it to specific cells and determine exactly what is allowed in those cells.
View 5 Replies
View Related
Jan 8, 2013
I want my IF function to populate two cells with two values if argument for IF function is found TRUE. Is it possible?
IF(logical_test, [value_if_true], [value_if_false])
value_if_true = return multiple values in mutiple cells (for example put number 8 in cell A2 and number 10 in cell A3 if function is TRUE)
How would I do that? I tried putting IF(logical_test, (A2="8",A3="10"), [value_if_false]) but it is not possbile...
View 3 Replies
View Related
Jan 25, 2009
For the odds range, i have already two cells(the upper(F9) and the lower(E9)) and i have a cell named the current odd(G9). What are the formula together for the attribut cell(H9) for the following data:
1.0 : The current price is outside and below the odds range spread. For example, if the range is between 2,00 and 2,20, the range’s attribute will be 1.0 if the current price is below 2,00
NOTE: Obviously the formula for this one is =IF(G9
1.1 : The current price is on the bottom edge of the “odds
range” figure. For example, if the range is between 2,00
and 2,20, the range’s attribute will be 1.1 if the current
price is 2,00
NOTE: The formula for this one would be =IF(G9=E9,1.1)
1.2 : The current price is inside the “odds range” spread
and is placed one or two clicks from the bottom edge. For
example if the range is between 2,00 and 2,20, the range’s
attribute will be 1.2 if the current price is 2,02 or 2,04
NOTE: I have a hard time creating a formula with this one.
2.0 : The current price is outside and above the “odds
range” spread. For example, if the range is between 2,00
and 2,20, the range’s attribute will be 2.0 if the current
price is above 2,20
NOTE: The formula would be =IF(G9>F9,2.0)
View 9 Replies
View Related
Feb 27, 2014
I'm essentially trying to place a column that is largely based on another....a function that will calculate the following information
Carriers with 1 Vehicle - 25.00
Carriers with 2-4 Vehicles - 100.00
Carriers with 5-9 Vehicles - 200.00
Carriers with 10-24 vehicles - 400.00
Carriers with 25-49 vehicles - 750.00
Carriers with 50+ vehicles - 1500.00
In other words.
One column in my spreadsheet has number of vehicles. I want another column that will provide the according application fee as found in the information above.
View 13 Replies
View Related
Jul 9, 2009
If I want to create a function or sub that can be used by any userform or macro that I create for a workbook:
Where would I define that function? Within the Module?
Do I define it as Public?
View 4 Replies
View Related
Sep 25, 2008
I've tried many variations but I can't seem to find a solution - I hope you can help. I'd like a formula that will ideally achieve the following:
IF B5:F5 all contain the letter y then return "Pass"
IF B5:F5 AND G5:K5 all contain the letter y then return "Merit"
IF B5:F5 AND G5:K5 AND L5:K5 all contain the letter y then return "Distinction"
IF B5:F5 is blank return blank
IF there are Y's in B5:F5 and the total < 5 return "Fail"
I did a sample sheet to show the desired output but don't know if this forum supports attachments.
View 9 Replies
View Related
Oct 29, 2009
I've got some data formatted by column in the worksheet that I'd like to pass into the function and have it return something from an array. This is essentially a replacement for vlookup, but easier considering the volumn of data I've got. Take something like this...
Column N will have integers (0 through 20)
I want to pass contiguous parts of N into the function and have it return the corresponding sum of values from the respective positions in an array I defined locally. Here is the function:
View 2 Replies
View Related
Aug 6, 2014
I've attached a sample of the data I'm using.
I have two spreadsheets (the samples for which I have shown side by side in Sheet 1 of the attached file).
Spreadsheet 1 is about 30,000 rows and too large for me to change the formatting and structure.
Spreadsheet 2 is the output I need and the format is required by other stakeholders.
In spreadsheet 1 I want to sum quantity in stock for Type 1, Type 2 and Type 3 for each product and allocate it to spreadsheet 2 according to the month in which the product expires. For example, there will be a total of 92 units of product 413302 which will expire in Nov, 2014. Therefore I want 92 to be placed in cell N6 of Spreadsheet 2.
Unfortunately the product number is not unique - there are multiple sub products in spreadsheet 1 but they all have the same quantities of stock. The sub products are referenced in other parts of the report so I can't consolidate by Product Number. This also prevents me from using the SUMIFS function as it will duplicate the number found in the sub products.
What I need, perhaps in a combination of functions, is to find the first instance of product 413302 in Spreadsheet 1 that is expiring in Nov 14, sum the product types and give the result in cell N6 of Spreadsheet 2.
View 3 Replies
View Related
May 29, 2007
* I have a complex Excel workbook with several worksheets.
* The first worksheet is for raw data, which consists of a single string of data, separated by spaces, to be uploaded to a mainframe. There is no consistent pattern of length of data or strings in between pieces of data, which can vary widely. An example of the data would be something like this:
XXXXX YYYYY NN XXXXXXX
* For testing purposes, I need to come up with a way to parse the data for easier viewing. The current approach is this:
* Take the string and divide it up into individual cells by using the MID function. In the above approach, this would split the data into four (4) different cells.
This is going to be a very complex workbook with data strings that can have 20+ elements in them, and have lots of separate records, etc. While this way should work (if everything is entered perfectly and no data structures ever change, etc.),
View 11 Replies
View Related
May 9, 2009
I am trying to somehow use multiple IF functions. I was able to use one IF function to disply '--' in a cell if a particular formula = 0. However I ran into a problem when negative values were displayed. I wanted the value to be a positive number. I thought I could use another IF function to multiply the formulas contents by -1 if it were <0, but I keep getting a #VALUE error in my cells. Is there a way I can have multiple conditions?
View 2 Replies
View Related
Dec 5, 2008
I am trying to create a custom function to act much like the database capabilities of excel in summing a column based upon multiple criteria of other columns. First, before I get too far, does anyone have an already built custom VBA function that will accomplish this? I find that using the built-in database functionality in excel is VERY slow!
Anyways, I am trying to pass an argument that contains multiple ranges (much like you can do with the SUM() function):
=MultipleSUMIF("E11:E14, F11:F15", "A1, E1", G11:G14)
The first set of arguments is the ranges that I need to look through. The second set of arguments is the values that I need to search within the first two ranges. The third argument is the column that I need to perform a SUM function on.
Instead of doing this, how can I create a function that will allow me to say, "Add another criteria range/value" and it will add another criteria to the list. I am currently passing a string, and that is not ideal, obviously.
View 9 Replies
View Related
Jun 23, 2009
I have a spreadsheet using Data Validation to offer a list of text values for cells in the range E6 - E100. I have a worksheet change funtion to change the colour of the entire row based on the text chosen from the list.
What I would like to add is an input box that will appear when the value in the cell = "COMPLETE" asking for a completion date and adding the inputted date to the cell in column I in the same row.
Existing Worksheet Change Code;
Private Sub Worksheet_Change(ByVal Target As Range)
'Colour code rows based on order status
Dim rng As Range, i As Long
Dim cell As Range, Answers As Variant
Dim Colors As Variant
Colors = Array(24, 15, 38, 44, 42, 20, 36)
Answers = Array("CLOSED", "SUSPENDED", _
"COMPLETE - Awaiting Inspection", "COMPLETE", "WORKING", _
"SCHEDULED", "READY")
Set rng = Range("E6:E100")
rng.EntireRow.Interior.ColorIndex = xlNone
For Each cell In rng
For i = LBound(Answers) To UBound(Answers)
If LCase(cell) = LCase(Answers(i)) Then
cell.EntireRow.Interior.ColorIndex = Colors(i)
Exit For
End If
Next i
Next cell
End Sub
View 9 Replies
View Related
Nov 11, 2006
I need to create a formula that counts the number of times that an age range appears within a column. In column G, there is a list of ages based on a demographic collection. The ages range from 13 to 50+. I want to designate another cell to count the number of times the characters between 13 and 18 occur within that column. I have =COUNTIF(G8:G20,"13") How do I add "14", "15", "16", "17", and "18"?
View 2 Replies
View Related
Jul 19, 2007
I have this formula
= COUNTIF(AT6:AY6,"F")+COUNTIF(AT6:AY6,"P")+COUNTIF(AT6:AY6,"M")+COUNTIF(AT6:AY6,"D")
that returns the number 2 (which is correct). However, if I precede it with
AZ6/COUNTIF(AT6:AY6,"F")+COUNTIF(AT6:AY6,"P")+COUNTIF(AT6:AY6,"M")+COUNTIF(AT6:AY6,"D")
it returns a DIV/0 error, even though AZ6 has a value of 24.
Surely 24/2 would return a value of 12? NB AZ6 cell value is derived from the result of a formula.
View 3 Replies
View Related
Oct 16, 2007
I have multiple IF functions in a formula and found out that the maximum allowed is 7 and should use Lookup instead. The formula is to calculate the Present Value of an amount with the corresponding interest rates and number of days left.
View 3 Replies
View Related
Oct 26, 2007
When using watch window to watch a formula that has multiple formula's in it, is there a way to see the result of 1 formula within the big formula?
E.g. say you have:
= SUMIF(A1:A11,"207",B1:B11)/COUNTIF(A1:A11,"207")
And you put a watch on that, but in watch window it shows the result of the whole formula, say if you want to watch only the SUMIF part?
Im using Excel 2003 by the way.
View 5 Replies
View Related
May 23, 2008
I am currently having trouble with what I thought was a simple IF statement. As you will see from the formula I want to complete a statement for every month of the year but Excel will not let me go past July. Is there a limit to the number of arguments in an IF statement and how do I overcome this? =IF($A$3="Jan'08", SUM(C7),IF($A$3="Feb'08",SUM(C7:D7),IF($A$3="Mar'08",SUM(C7:E7),IF($A$3="Apr'08",SUM(C7:F7),IF($A$3="May'08",SUM(C7:G7),IF($A$3="Jun'08",SUM(C7:H7),IF($A$3="Jul'08",SUM(C7:I7),"n/a")))))))
View 5 Replies
View Related
Jan 31, 2014
1.I need to protect certain locked cells from editing and allow certain unlocked cells to be changed on multiple worksheets.
2.When all of the changes are made to the unlocked cells, I need to password protect the entire workbook (except one worksheet) from any changes. (i.e. Prevent even the unlocked cells from being edited)
3.I also need a password to un-protect the workbook and return it to the state described in # 1. above .
View 1 Replies
View Related
Apr 2, 2014
I need the values that are copied from the template to copy over in text form from the "Data" Tab. Secondly, the master sheet has multiple lines for each vendor. For the area highlighted in red I'd like for it to copy all cells in column C for the vendor and search the vendor by name. Then, move to the next sheet.
View 10 Replies
View Related
Feb 17, 2014
I am having trouble evaluating two conditions with nested logical operators to produce the output I need.
For example Condition 1 has 5 choices (A,B,C,D,E) and Condition 2 has 3 choices (a,b,c).
Breaking it down,
[Condition 1] option "A" always applies and should give "Yes" (No matter [condition 2], "A" always gives "Yes")
[Condition 2] option "c" always applies and should give "Yes" (No matter [condition 1], "c" always gives "Yes")
[Condition 1] option "D" never applies and should give "No" (No matter [condition 2], "D" always gives "No")
[Condition 1] options "C" and "B" only apply if [condition 2] is "b" (if so, the answer is "Yes")
What I need is the equivalent of:
if ((([condition 1] == A) || ([Condition 2] == c)) || (([condition 1] == B || C) && ([condition 2] == b)), "Yes", "No")
View 4 Replies
View Related
Jan 1, 1970
I want to put a formula in a spread sheet that if block f5 is equal to or higher than 20% of block b4 then block d3 * .0 if less than then * by .0078
View 14 Replies
View Related
Aug 26, 2012
I have a model that does a projection for 36 months ahead on a spreadsheet. The projection depends upon a randomising "volatile" function. When I press recalculation a new projection is generated. I want to capture the set of numbers that appears at month 36 through repeated recalculations written to a separate sheet. I want around 500 of these numbers.
I have no experience with macros so doing it with preset functions would be preferable. If it has to be a macro, the easier the better. If invoking the spreadsheet and outputting to a flat file is easiest that is fine too.
View 3 Replies
View Related
Sep 17, 2013
I have several formulas that I use over and over, so I'm creating VBA functions that I can call from a worksheet.
But...when I have multiple inputs going into a function, is there a way to remind the user which input comes next in the same way that Excel does with built-in functions?
For example, when you type in =PMT( Excel brings up the helper text so you know that the order of inputs is (rate, nper, pv, etc....
Is there a way to bring up that same helper text in my own function? So if I have up, down, right, left as inputs and give the spreadsheet to someone else, they can see it's up, down, right left and not right, left, up, down .
View 4 Replies
View Related
May 14, 2008
I think this is an easy one, but i can't figure it out. I have a spreadsheeet with multiple concatenate functions programed in. All of them work. If, however, i try to change the formula inside the concatenate function it freezes and will not calculate the new cell. I have the calculation tab set to automatic in the options tab...
View 9 Replies
View Related