I'm trying to make a chart viewer on the first sheet of my spreadsheet and am using this website as a guideline, [URL] However instead of the 3 charts in the example, I have 12 which makes my formula for defining a name substantially longer.
By moving my charts to the same sheet and getting rid of the INDIRECT formulas, I shortened my formula to 291 characters which is too long as the limit is 255.
If Average GMV (Cell A1) is less than 75% of Average BP (Cell B1), use Average GMV, however the Average GMV or Average BP can't be less than $600 million. Multiply the result by .01*1/3. Below are two equations I've created, however each of them only solves one part of the problem.
Essentially Average BP would be used, unless Average BP was something like $900,000,000 and Average GMV was around $650,000,000. At this point Average GMV is 72% of Average BP and above the $600,000,000 minimum.
Knowing Excel adapts its formulas upon inserting a row (i.e. a sum formula will automatically include a new row inserted in the middle of its range). Is it possible to do this with a named range. I have a pivot table that serves as a table for a vlookup, but the table sometimes changes month to month with extra accounts. I need to be able to keep the formula even though the table changes, so I figured a named range would help me out but it still doesn't accomplish what I need it to do. So basically, is there a way to make the Named Range, say AGroup (A1:C5) extend to (A1:C7) if 2 new rows are added in?
I have a form in excel that people are going to populate, then a button which runs a macro which copies all the cells out into a new line in a different worksheet inside the spreadsheet. im going to use that sheet to formulate graphs etc, the macro works however it overwrites previous data, im assuming i need some function to calculate which is the next empty cell then use this to to copy the data to
I would appreciate knowing how to fix this formula to do more than less than/more than answers. How do I have the following answers return for these birth year ranges? I have attached a sample file, with the formula in place. Thank you so much for any help!
1974-1991 = amateur 18-35 1900-1973 = amateur 36 and up 1992-1994 = junior 15-17 1995-2005 = junior 14 and under
I am starting to write a macro and first thing i Need to define is all the columns that I need in my report. I started out by defining an array and this is what I have so far.
I need that every time I run this macro it should vlookup the data from cleantxt files that are saved in my c:autofile ReportsFC Banded Summary and essentially create separate excel files for different buyer names and save those sheets to my C:Banded Summaries with the name as Bandedsummary(todays Date)_BuyerName
This is going to be the bones of it then I have to figure out how to vlookup data for all the columns and do sumifs and format it.
This is what I have so far: Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean IsInArray = (UBound(Filter(arr, stringToBeFound)) > -1)
I have a piece of code I am using to important data from a text file. The code works fine but I am having a hard time understanding how defining a Variable "As New Collection" works. I have tried to research on numerous websites dedicated to excel but had no luck finding any further information.
I have executed the code line-by-line over-and-over and believe what the "new collection" does is it creates some type of external database that is hidden within excel (that's just my guess). I have attached a sample file and a text file with dummy data if needed to see how the code is working.
I'm trying to develop a work spreadsheet template that is to be summarised every fortnight. Our fortnights here go Thurs-Thurs. So I figured I would start with a base date (thurs - Sept 4th) and then have the spreadsheet display the true fortnight ending upon loading. Ultimately this fortnight ending will be used to copy and paste the template information into a summary spreadsheet but for now I am trying to get this intial part working. It's linked to a command button and my attempt at code is below:
Private Sub CommandButton1_Click() Dim Base As Date Dim Now As Date Dim Delta As Integer Dim No_of_Fortnights! Dim Rounded As Integer Dim Fract! Dim Fort_week_end As Date
(Note the following 8 lines are not the problem, they just open the main sheet. The problem is the eights lines starting with the word 'set')
If I have a column of data with a defined name is there an easy way to update this as data is added? Can this be done when you open the workbook and without? I'd assume an open event could do it but I'm having problems finding a simle solution.
I'm having an issue trying to locate a certain value in a cell. If it is a number, say 50, then my code works, if its a word though then it doesnt work. How can I get this to search with a list of words rather then numbers?
Sub alpha() Dim cell As Range For Each cell In Range("A2", ["N27"]) If cell.Value = Beff Then cell.Interior.ColorIndex = 6 'doesnt work If cell.Value = 50 Then cell.Interior.ColorIndex = 6 'does work Next cell Range("A2", ["N27"]).Font.Bold = True Range("A2").CurrentRegion.Copy Sheets("Sheet1").Select Range("A1").Select ActiveSheet.Paste Sheets("Sheet1").Select End Sub
What the code does is that it runs in a Master workbook, and searches for XLS files in a defined folder. It opens a file, count, closes the workbook and takes the tallied number of sheets and places it in the master file, column A being File Names and column B as Number of sheets. What I need is for the code to take the file name from column A, run it and then place sheet counts in Column B and then move down the columns until all the counting is done. Currently I am only able to define one row using the range function and i'm at a loss.
'Get file names and enter into Master Public Sub ShowFolderList() Dim wb As Workbook Dim ws As Worksheet ChDrive "C" ChDir "C:Documents and SettingsTest Folder" outrow = 2 Filess = Dir("*.xls") While Not Filess = "" Cells(outrow, 1).Value = Filess outrow = outrow + 1 Filess = Dir() Wend.......................
This formula calculated the time between two dates (Start date in C2, End Date in C3) between the hours of 06:00 and 18:00 on weekdays. This is so I can work out how long an incident has spend within the group at the time when our service should be operating.
I was given this formula by someone on this forum a while back and i was new to excel and formulas so I just took it at face value since it worked. Now I want to disect it so I can use it in other situations where similar calculations are needed. I want to try to break it up into easier to understand chunks to try to understand what it is I need to change in order to do these related calculations.
Is this trying to distinguish if D2 is a weekday?
MOD(D2,1)*24 Is this not the same as (1-D2)*24 NETWORKDAYS(C2,C2)*MOD(C2,1) Is this not the same as: IF(weekday(C2)>5,(C2-1)*7,0) IF(NETWORKDAYS(D2,D2),....,....) What is the comparison here? if NETWORKDAYS(D2,D2) = 0 or 1?
I'm trying to define some ranges with a loop but being a newbie at VBA I'm finding it difficult to solve the error in the code. First, as the data area is uncertain (variation in the number of rows and columns) i look to the end of the entire data area. Then i want to define intervals of 250 rows with a 30 row difference between each of them. Here is my
I am trying to perform certain actions on just some worksheets in a workbook. I realize this is probably a simple thing, but I've been unsuccessful in my search of the web so far.
What I'd like to do is define the worksheets (i.e. "in worksheets" below) in the below code to only include a list of worksheet names (which I can provide - ideally via a list in the worksheet in Excel, say in cells A1:A15 of a tab called "Tab List".).
It's just meant to work through a long list of data blocks defined by column 8 changing. At that point I want to calculate the average of the first 20 entries in columns 12, 13, 14, 15, 16, 17 in that particular block.
I can achieve the sort and calculate the block start rows OK, just can't get the average definition right.
So I have a spreadsheet with a list of companies, list of users within those companies, and the status of those users(Active/Inactive/Deleted). I'm trying to determine the company-level status based on how the overall status of all the users in the company.
Code: A B C D Company A User 1 Active Company A User 2 Active Company A User 3 Inactive Company A User 4 Deleted Company B User 1 Inactive Company B User 2 Active Company B User 3 Inactive In the above example, cells D1 to D4 would list "Active", since Active users form the bulk of the company. D4 to D6 would list "Inactive" for Company B. I'm trying to use a formula to automate this for the whole spreadsheet (5,000+ rows)
I've figured out the first half of what I need to do:
My problem is in getting Excel to automatically define the cell ranges according to the cells that contain "Company A", "Company B", etc. I have over 5,000 rows on the spreadsheet so having to manually change the cell ranges for each company would take forever.
I'm having some issues getting a tool I'm working on to function correctly. I have some cells, the number of which can vary based upon user requirement, that contain cell addresses. What I need from VBA is to translate these addresses into usable row, column values for the user defined range. Example:
Cell D4 contains F14, which was input by the user.
What is the best way to pass this data through VBA. Right now I am currently using:
Dim strRange as String 'left out loop parameters dim TempRange as Range strRange(i) = Cells(4, 4) 'using TypeName on StrRange at this point yields a string result as expected set TempRange = Range(strRange(i))
From my understanding that should work but I am getting type mismatch.
I do not have any reason for actually using a string, but would like the user input to only be 1 cell. If there are cleaner ways around this, I am open to them.
Then from the range, I would have two other variables as type long for storing the row and column data using: