When you have a formula that contains calculations using other cells, the formula will recalculate every time that referenced cell is changed.
In my attached spreadsheet in the June 2007 Worksheet, in Column C10+ I am calculating realtime pip values given a stream of data from a DDE server. The DDE server values are in the Data tab. For ease of use I have also added a manual setting as I am sure no one here has the DDE server in question.
My problem is everytime the DDE server (Or manually as it may be) changes the data field, the values in Column C and F on the July 2007 WorkSheet get changed.
I would like Column F to only calculate one time (At the time of entering the trade).
And I would like Column C to Stop updating and use the last updated value once the corosponding cell in Column G has a field data "Closed".
This is very important to me as if it keeps updating over time, then a couple weeks into trading, the pip values may have adjusted substancially giving incorrect $ values in other cells.
I have 7 numbers. The numbers are going to be grouped in threes. (Ex. 123,124,125,126,127,134,....) I want to assign column/range for each number... 1=A2:A100, 2=B2:B100, 3=C2:C100...
So for 123 the formula would be... sumproduct(--(A2:A100>criteria),--(B2:B100>criteria),--(C2:C100>criteria))
It would be awesome to have the formula automatically calculated based on the numbers I choose.
When a date is entered e.g 1/27/2007 The bill payment dates should all be automatically calculated under the “Date” column. Rules for the date
Rule1. e.g. 1 Month—the date should be 1 month after the date entered (as shown by the simple example 1/27/2007 one month is 2/27/2007 in the sheet)
Rule2 if the date entered is the last day of the month, the calculated date should also be the last day of the month provided it is a working day. E.g 1/31/2007 one month is 2/28/2007. (provided 2/28 is working day) 2/28/2007 one month is 4/30/2007 (provided 4/30 is working day)
Rule3 If the calculated date based on rule1 and rule2 is a non-working day, the date is pushed back by 1 till it becomes a working day. e.g 1/27/2007 two month is 3/27/2007 if 3/27/2007 is Saturday it becomes 3/28/2007 which is a Sunday, another non-working day. So the output should be 3/29/2007
Rule4, under rule3, the date cannot be pushed to the next month. Instead, we push the date forward. In the previous example assume 3/29, 3/30 and 3/31 are all public holidays, by rule3, it will be finally pushed to 4/1. But this becomes another month. So we push forward instead to 3/26 which is Friday. The output is 3/26/2007
Definition of working dates (Monday to Friday excluding the holidays listed in the sheet).........
If MonthView control can be set to allow users to select multiple ranges and enter different dates into those ranges? I know I was able to do with with the previous Datepicker control and I thought it was as easy as setting the Show Modal property to true.
complete the attached code (Excel VBA) to automatically process a File Download dialog from Internet Explorer. I want to click "Save" which will produce the "Save As" dialog. Then I need to enter a default filename like (C:Temp) and click "Save" again. When this is working, I will hide Internet Explorer to make the operation completely transparent to the user. The URL is a sample chosen specifically for this test case.
Public Sub Report_Test()
Dim objIE As SHDocVw.InternetExplorer Dim strURL As String Dim varItem As Variant
' Establish connection to the Internet Explorer application. Set objIE = CreateObject("InternetExplorer.Application")
' Set Internet Explorer visible. objIE.Visible = True
I'm developing a workbook containing 121 sheets. Sheet 1 is effectively an index, and uses 120 form control checkboxes to unhide and display the selected sheets individually.
The code I'm using for each checkbox is below and is in a module.
I have a sheet containing employee data - 13,000 rows - one for each employee.
Column A contains their store number (there are about 1300 stores in total) and column H contains their name.
Is it possible to create a macro that, for each change in store number, will create a named range for the employees' names in that store automatically?
I'm trying to copy data from one sheet to another sheet automatically based on a number selected in a drop down control.
I have used OFFSET to pull some information successfully from a list. This is easy for me to do with single entries and a list and has worked well. I want to do similar but with a dataset not just single cells.
But, I can't seem to make OFFSET work to show a set of data easily.
Perhaps I will need VB code to do so? Or there is another control I'm not aware of? I've done very little with VB.
I'll attach a sample file to try to show better what I'm trying to do.
The table below has three rows and 7 columns. Row 3 shows cumulative sums of the values in Row 2. Sometimes, Row 2 may not have values (not even a 0). The formula for C3 is =SUM(B2:C2) and =SUM(B2:G2) for G3. The challenge is that I have a very long row and summing it individually would be inefficient.
Is there a way of automating the formula so that the cell ranges expand automatically which I could use to fill to the right?
A BCDEFG 1Row 1123456 2Row 21041503 3Row 3115202023
Ok What I want to do is copy the info in Cells A1:N55 into cells A63 onwards, now this I have completed so far with the following code, but what I also want to do is copy any changes that are made in cells A1:N55 from when this copy function is run into cells A63:N118. Does anyone know of any way I could go about doing this?
Sub CopyJob()
Dim wSheet As Worksheet, strWS As String
For Each wSheet In ActiveWorkbook.Sheets strWS = Left(wSheet.Name, 2) Select Case strWS Case Is = "AJ", "CJ", "PJ" .......................
I've created this fantasy football programe to calculate all the scores from all matches in this years European Championships.
Basically everybody ranks each team from 1 to 16, giving 16 points to the country you think will win the european championship, 15 points to the runner up, and so on down to the country, you think is the weakest on just 1 point.
Everytime I try and change one of the values in the 'Results' tab I get an "Compile Error/Syntax Error".
What this macro should do is sort all the data in the "League Table" tab into a highscore table list.
Private Sub Worksheet_Calculate() Application.EnableEvents = False Range("b1"). CurrentRegion.Sort _ Key1:=Range("h2"), Order1:=xldescending, Key2:=Range("c2"), Order2:=xldescending, key3:=Range("e2"), order3:=x1descending, Header:=xlYes Application.EnableEvents = True End Sub
I m trying to get around here within the company I work for.
I'm interested to know how to set a specific range value e.g. "5 to 10" once a value is between those 2 numbers, and then if the value in the next row below is 34.12 it will be "30 to 35".
Here's an example code I constructed, but the darn thing just keeps on running
way for excel to automatically identify ranges given the first cell of an array.I guess the concept is simple:
Lets say given A1 is the top left corner then excel should look the offset columns for values and/or formulas,when nothing is found and a blank cell is found then that's the border column.Then same goes for rows,and when bootom row is found then the bootom right cell can be identified and array/range is found!
Macro that could look at a row and take the values of two cells, combine them and then create a range name for a third cell in the row.
For example; for row 5420, in column C there is the word Florida, in column D there is the number 6235, and in column F there is a sentence or two. Is there a way to automatically create a named range for the cell of column F that would be named FLORIDA6235? And if so, can the macro do this for every row even if the word and/or the number changes.
I have roughly 28,000 rows and nine columns that I am working with. That's why I was wondering if there was a way to automate this. There are 10 states and I don't know how many different numbers attached to the states, however there are many state and number combinations that repeat, so there would be several rows with Florida in column C, 6235 in column D but a different description in column F.
Its fine but if i insert a new row or column then it mucks the whole thing up. Is there away of naming them but if any cells, row or columns are inserted the range will automatically adjust to suit1
Within the ComboBox properties, is there anyway to control after "enter" his hit, you move to the right instead of down (similar to the edit under Tools/Options)?
I have created a userform within VBA which has a TreeView Control and a Spreadsheet control on it.
I have populated the TreeView control with data and what I want to be able to do is to drag the nodes off the TreeView control to the spreadsheet control.
I can drag onto a normal worksheet but not onto the spreadsheet control (the no drop mouse pointer keeps showing).
How do I determine which control the user is currently modifying on a multipage form (either changing, enterying or exiting the specific control). when I use "userform1.activecontrol" i get "multipage1" as the control name but I need the actual control on the specific active multipage. (also the .TABINDEX is for the multipage regardless of the on-page control) I use a generic data-field change SUBroutine so need the control name (and the TABINDEX) to provide my SELECT CASE. (so every fieldname_CHANGE calls the same SUB [with no parameters])
I need help creating a macro that will search through my excel spreadsheet and for every instance where column A isn't empty it should cut a range of columns from that row and paste them in a different range of columns in the row before it. It should then delete the row that it cut the columns from and keep searching until it has done this for the whole worksheet. I can modify which range of columns are needed, but it has been so long since I've worked with excel macros that I haven't been able to do it.
If Quota 1 percentage => 90%, then Quota 2 percentage = sales / quota. If Quota 1 percentage < 90% then Quota 2 = sales / quota, with the maximum # being 200%.
If Quota 2 pecentage => 90%, then quota 1 percentage = sales / quota. If Quota 2 percentage < 90% then Quota 1 = sales /quota, with the maximum # being 200%
I was able to calculate this fine with one of the scenarios above, but not sure how to make it work with both at the same time.
I have a pivot table with a calculated item. The problem is that it shows data for all rows EVEN when there is no data there. So the pivot table is a lot longer that it needs to be. How do I get the pivot table to show only rows with data in it? Also, all of the fields DO NOT have checks beside "Show Items With No Data".
I've written a custom function that calculates commissions (as a %) based on three variables.
I wanted to know what code I can use to cap the amount of commission paid out to a specific % amount. Something like "as soon as X exceeds 3 times the amount of Y, payout 3 times Y as the maximum".
I am trying to write a VBA macro that will mimic what i have already done in an excel worksheet i have made. The excel worksheet uses inputs for a heat exchanger and finds the temperature as it leaves the heat exchanger. This temperature is then the new input for the second line of the worksheet and it changes quite a few of the values in the sheet. I have the excel worksheet working where you just drage the row down and it does it automaticly, but i would like to have a VBA macro that all the values can be input in with the number of cycles until the heat exchanger equalizes out.
I am able to get the macro to work when it calculates just the first cycle, all the equations work my variables are ok for just one time. What i don't know how to do is make my program realize that it has to use the calculated temperature out of the heat exchanger as my new input for the heat exchanger. I know how to do it once so it is more of a syntax or understanding of a loop or an array for the values that are changing.
I have a column in powerpivot that has Products total amounts. Some of them are negative amounts but I want them to be positive. How would I write an IF statement for it? I want it to say " If Division amount column is a negative, then multiply by -1 but it is a positive , leave it as a positive" .
It is a few years since I worked in the IT industry and used EXCEL a lot. I want to use (formula) SUM on a cell which 'sums' 3 other cells one of which has a the result of a formula but the result of that SUM is always 0 (zero). I am sure I can remember doing this in the past but cannot determine how it is done. eg.
I am entering data for a month on one worksheet. The next month I change the date and reenter new data. I want another worksheet to record the data on a month to month basis, one month in one column, the other month in another column, to have year to date. Is there anyway to do this. Currently, I use an if statment =If(a1="January",b1), but I need to change these to values before I do the next month, and alter the formula to reflect the new month name)
I am trying to input data validation on a calculated field. The calculated field (sum of 10 fields above it) must not total over 100%. I have used the following in the data validation menu: Allow: whole number. Data: less than or equal to 1
This doesnt seem to be working when I input values of a total greater to 100 from its input cells however, it does return an error if I manually input a number over 100%, then it gives me an error message. Edit - sample sheet attached.