Can a Function give two or more output variables. e.g.
Sub a() x = 5 result = Y(x) End Sub
Function Y (x As Integer) As Integer Dim B B = ... * x Y = ... * B
this will give back Y as a result. But if I want to get 2 or more output variables (let's say I need to get also B into sub) from one function, how should I do that? I need this because function works with large matrix and I want to extract some values appeared in between.
I'm trying to loop through a range in excel from access, checking where the titles (in Excel row 1) match with the fields (in a recordset in Access that is passed to the function) - and where they do, I want to dimension a variable to hold the column number - I'm not sure it's possible, but I'd be interested to know either way. The line I'm asking about is at the bottom of the code - the rest of the code is just to give context...
Sub ImportGeneric(rsImported As ADODB.Recordset, rsConfirmed As ADODB.Recordset) Dim fd As FileDialog Dim xl As New Excel.Application Dim wb As Excel.Workbook Dim ws As Worksheet Dim iFilePicked As Integer Dim strFilePath As String fd.Filters.clear fd.Filters.Add "Excel files", "*.xls" fd.ButtonName = "Select" iFilePicked = fd.Show If iFilePicked = -1 Then strFilePath = fd.SelectedItems(1) Else ..................
i have a "problem" to empty / reset my variables. I defined them as vHour1_KW2 where the "1" is from 1 to 21 and the "2" starts from 1 to 53. Now I want to erase all of this variables or to set the value of them to "0". At moment I use following
I am trying to sum up a list of cells that have formulas attached so if there is no number in the formula it shows up as #N/A how do I make it so wherever there is an #N/A it equals 0?
The formula is designed to sum a set of data based on 22 variables between a certain date range. In order to keep the formula manageable, I have grouped the variables into arrays.
Each array (listed horizontally on one spreadsheet) calls a specific column of data to match from a different worksheet. I have no problem if only applying one array but multiple arrays return incorrect values.
I have a table that have a test or character and value (number) like A 5 B 6 C 3
And another table that has a set of characters that I want to sum the value of the characters like A B C 14 So that the result of summing the characters will be in the next cell.
I'm having a problem summing after running arrays to analyse data. I have a list of four possible outcomes and I need sum up the totals, but sometimes there are no results, so there is #DIV/0 in the list I need to find the total for.
is there some code or some kind of formatting that would give me a total even if #DIV/0 is in the list?
I'm working with a worksheet with 4000+ rows, so I'm looking for a formula to automate a summation. In Worksheet1 (4000+ rows) I have data from 1998 to 2008 for each month and day:
Year Mo Dy Data 1998 1 1 41 1998 1 2 35 1998 1 3 79 ... 2008 12 29 39 2008 12 30 81 2008 12 31 42
In Worksheet2 (365 rows) I have data for just months and days:
Mo Dy Sum 1 1 94 1 2 103 1 3 222 ... 12 29 65 12 30 211 12 31 98
I'd like to take each Jan 1 datum for each year from Worksheet1, sum them, and place the value in the cell that corresponds to Jan 1 on Worksheet2. I've primarily tried using the VLOOKUP function, but can't seem to make it work.
There is one value for 000108159900, which is 0.97 and three values for 000108160000. This is just a very small sample. I have about 12 million such rows. What I'm trying to do is create a separate column that will say 000108159900 has a total value of 0.97 and 000108160000 has a total value of 2.57. How can I do that?
I've got a spreadsheet with bird species, dates (just day-month) and numbers (how many individuals). It looks a bit like this (well....the real sheet is a lot bigger). Note that some dates appear multiple times, because I counted for many years.
1 A B C D E
[Code]....
What I want is an overview, to be able to check which birds I've seen on which days of which months (the year doesn't matter) and in which numbers. It's supposed to look like this.
1 A B C D E F
[Code]....
It should look for duplicates in row 2, and sum up all the values within these duplicated columns into the first one... It should also remove the columns from which it has summed up the values, except for the first one.
is there any easy way to take the sum of a really lond diagonal? I know i could use a macro, but I was wondering if there was a way to do it with formulas, the sums will ultimately be used for a graph,
What I want is to sum any/all groups of numbers larger than 0 that are grouped in 4 or more....e.g. in my example D1:G1. The answer should be 150.... I'm trying this formula: ...
above is a sample of a very large table that I need to extract year to date/month to date information and year over year comparisons- the top line is the Sales territory (eg 112) down the side I have a code that will code each month with each year - eg(108 - which represents JAN08) I need a formula that will read 108 and 112 and calculate everything that pertains to that criteria. So for this instance territory 112, Jan08 would be a total of $8,613 - can anyone help? Oh, and the columns are not fixed as the next download might have a different order of territories across the top.....
I have a list of students who achieve grades A-G in subjects and I have organised these into columns. I then need to be able to be able to count a total of how many grades they have achieved, how many As, Bs etc. So far I have managed this but...I need to be able to attach different values to the grades. Some subjects are worth 0.5, some 1 and some 2. I cannot work out how to count if they achieve a grade A worth 0.5 + a grade B worth 1 etc.
1. I need to find the average monthly meter reading say for the whole year...this is what I have, =(C2-B2)+(D2-C2)+(E2-D2)+(F2-E2)+(G2-F2)+(H2-G2)/6 is there an easy way to do this?
2. Also need to get the total monthly reading of all the machine, the formula I have is; =C2-B2+C3-B3+C4-B4+C5-B5+C6-B6
I have a row of numbers that I want to sum. However some of the data could not be retrieved and that means in some cells in the row of numbers contain the message: " #VALUE " and when doing SUM it returns #VALUE
In the example spreadsheet I have attached/linked below contains a formula on the Cash Flow sheet in cell D4.
I have this formula working perfectly when instructing it to SUM all the ($) values for a specified month that is located on the Cash Flow sheet in cell B4 (Apr-13) and then it looks for all the matching criteria related ($) values that's located on the Trend Log sheet in column D. It then returns back the total exactly like it's supposed too.
However, when I want this same my formula that's located on the Cash Flow sheet in cell D4 to give me the SUM between the month in B4 (Apr-13) and the month in C4 (Aug-13), it won't work no matter what I try.
So I went back to the formula version I had that works with the one month in B4 (Apr-13) so you choose to you would have at least a good starting point. That is if you don't want to just delete the whole formula in favor of a better formula.
I'm pretty new to Excel and trying to create a spreadsheet for a friend. For the part that I'm working on right now, I have a cell to track donations received for every day of the month for every month of the year. Donations can be split into three categories (Field trips, Speakers, and Misc), so next to the cell for the manually entered $ amount I have another cell that provides a drop down menu to select from these three categories.
What I would like to do is have three cells at the bottom of the page that will total the $ amounts for each category. I've attached the page that I'm referring to.
In the attached spreadsheet I would like to calculate the totals for pipe and valves by service & size (Columns A,B D & D) from the groups of paired columns Pipes & Valves under the headings of SD0-1, SD0-2, SD0-3 etc etc to LP-SD8 multiplied by the number of Service droppers (Highlighted in red) with the totals in columns G & H.
I can individually write a formula such as G7 = (I7*I4)+( K7*K4) etc etc, but is there a way to lookup up the data cells?
I am trying to sum a filtered list and when a filter changes I want the sum to change and it isn't right now. I have attached a TEST workbook in which all the data is values but in my situation all of the data is actually read from a workbook from each agent.... not sure if that matters.
If I filter by District (East or West), how would I get the total to change? I am trying to avoid any vba or macro within this workbook.
I have a process that generates the value X in cell A1 randomly. So I can change the value of X in A1 by clicking on F9. I want to sum a sequence of X values. I can do this by manually copying each X to a row of cells and then summing the row values. But that is tedious. Can the summation be done automatically without being regarded as being circuler?
I have a vlookup function that is looking up a range of cells. I would like it to look in the range and then sum up all of the values that meet the criteria. At the moment it will only bring back the value of the first match it finds in the range, I would like it to bring back the sum of all the values it finds in the range, is this possible? Example:
Vlookup(Jan-08,$a3:$c$7,column 4 values, 0), if Jan-08 is listed in the range more than once, I would like it to add up all the values in column 4 that match.
I'm on Vista with Excel 2007, HOWEVER, the solution must be Excel 97-2003 compatible.
I have two columns. One will a Y or N in it, the other will have a number. I need to sum the column with numbers, but I ONLY want the numbers added that have a 'Y' in the same row of the other column ...