I have a financial dataset which I need to "clean" before manipulating/analysing.
Each row of the data represents a completed transaction and the first step is to delete rows that are done with particular (internal) clients; the client data (the client's name) is in Column D.
Currently, I delete the unwanted data by autofilter and delete (code below), however this means the clients to be deleted are only defined within the code. I would prefer to have a worksheet within the workbook where the user defines the clients by adding or subtracting their name from a list.
I have created a dynamic range for the client list by inserting a Named variable along the lines of "=OFFSET(!$B$3,1,0,COUNTA($B$3:$B$200)-1," which works fine.
However how do I work this list into my code so that it works when new clients are added or deleted?
Current code for deleting unwanted client data:
Dim LastRow As Long LastRow = ActiveSheet.UsedRange.Rows.Count
I want to delete names, formulas, macros of another workbook. For example, A.xls is my codes workbook. From this file, I want to delete the names, formulas, macros (but to keep the values & formatting in tact) of another workbook (there must be a prompt for which .xls file, the names etc. to be deleted). All files are in a same folder.
Trying to use a Defined Name as the cell reference in VBA. The idea is to change the value of a couple of other cells base on the value of the cell "FreightRow". I am starting with a Message box just to make sure the code was reading the cell reference.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim FR As Range Set FR = ThisWorkbook.Names("FreightRow").RefersTo If FR = 3 Then MsgBox ("Help") End If End Sub
I have a column J that is named Premium. If I use the function =INT(Premium) in K4 then it returns the integer for the value in J4. If I do the same thing with a UDF then the function argument receives all the values in column J. The author of the function says this is how UDFs work by design. Is there a way to use defined names with UDFs and have it work the way it does with built in functions?
I use Vlookup's a lot so i define my range with specific names a lot. But when i want to clear the range names via Insert>Name>Define>"Select the range name then click delete. but instead of clicking on each range name, i would like to to delete all.
I can create a macro to do this but some days i use different range names that other days so the below will not work exactly.
I am currently overhauling a massive workbook, that previously relied on an absurd amount of named ranges in order to run vlookups. I no longer need these named ranges and would like to delete them to unclog the workbook. Currently I only see a way to delete them one by one. Is there a way to mass delete all of them?
I have several SumIf formulas that references a Cell in a Main Reference Tab. This is useful to me as I have over 100 tabs of data points and having a reference cell with that text is easier to change one time vs 100 times.
My question is this: Will Defined Names be "faster" than using a reference cell? With over 100 tabs, there's a lot of formulas and I'm looking for a faster way to get the same output without Excel Memory overload.
This thread is related to this thread. Offset, Match, Max Formula In the Insert - Name - Define window:
If one wants to copy a formula from the "Refers to" box and the formula extends past the right side of the box, how does one use "select all" or mark the whole formula from beginning to end so it can be copied without messing up the formula. At the moment, when I try this, it changes the formula to include the active cell of the worksheet that's open when I use the Ctrl + c etc. I have tried Ctrl + Ins and Ctrl + a and Ctrl + c. None of these are working for me.
I have a situation where I copy a worksheet to further on in the same workbook (essentially, using it as a template to create new sheets). I have certain cells that contain references to named ranges, e.g. on NewSheet1, cell $A$1 contains =StudyNo. Unfortunately, it shows as #NAME?. But, if I go to the formula bar and press enter, it resolves the name properly. I thougt maybe that automatic calculation was on manual but it is not. Why is this happening and what can I do to resolve it.
I am looking to create a formula which sums the values associated with several defined names. For example, I have a workbook with the following defined names SalesPerson1Total, SalesPerson2Total, etc. and these amounts are all sourced from multiple tabs. The amount of defined names (i.e. 'SalesPersons') is variable, therefore, I want the formula to read Sum the values of all defined names which are named with the following convention 'SalesPerson(X)Total'.
I have created 500+ defined names that refer to worksheets that do not exist (yet). When I add the previously nonexistent worksheets, the defined names that refer to them are not "live" and do not work in functions where that name is used. If you go into the defined names and click on the ones that refer to the now existent worksheet, they start to work, but I was hoping there was a way around this step (e.g. a simple macro that says "update all defined names").
I created all the names so that the person who will eventually be using this will only have to add an appropriately named worksheet and put the data in...then everything will automatically work. I do not think adding names is difficult, but the person who will be using this does, so I want to avoid that person mucking around in my names.
I'm trying to simplify a spreadsheet i've been given by defining names for certain values. I'm using Excel 2013. Is there any way to have all of the newly defined names I've created for cells automatically be inserted into all of the formulas that exist in the spreadsheet?
Old formula in one sheet of a workbook looks up a cell in another sheet with the value of ='sheet1!A1
I've given the value of cell A1 in Sheet1 a name of dgwd.
How do I get every formula in the workbook that references 'sheet1!A1 to change the value within that formula to dgwd?
If I have a list in sheet1, of say 300 names, I need some code, that for a table on sheet2, from A1 to F500 will delete the contents of cells in columns B C and D, IF the value for column A in that row is from the list in sheet1
List of names: sheet1, A1 to A300
Table that needs changing: sheet2, A1:F500
cells to be deleted in columns B C D IF value in A corresponds to the list in Sheet1
I am looking for a formula that either accepts the number in a cell if the numbers on two other cells are "approved". In other words, I have on cell A1 my value to be tested. On cells A2 and A3 I have two numbers. On cell A4 I'm looking for a formula that copies the number on A1 if A2 is bigger then 0.25 and A3 is smaller then 0.35. In not, there's no copy or a N/A appears.
in my workbook i have 3 sheets named "time" "final" "push". in the sheet thats named "final" ihave in cells B2 and C2 2 values that correspond to a type interval (lets say 75-378) in the sheet "time" each row represents 1 sec, starting at one.
what i would like to do is locate the interval defined by the 2 values on "final" sheet and find the min max and value in column S of the "time" sheet.
i.e if B2 and c2 said 78 and 378 it would go on "time" sheet select the range of S78-S378 and find the mean, the max and the average and report them in sheet "final" in cells E2 F2 G2 respectively What would be optimal is that there was a way to perhaps loop so that it can do the same thing with the range defined by the values in B3 and C3.
I have an excel file crashing because of corrupted names.
I used the following macro:
Sub DeleteAllNames() Dim nm As Name On Error Resume Next For Each nm In ThisWorkbook.Names If nm = "Print_Titles" Then Resume Next If nm = "Print_Areas" Then Resume Next nm.Delete Next nm On Error Goto 0 End Sub
I then used the name manager to delete hidden names.
Unfortunately some of the names are corrupted...
Name Manager prompts me to change the reference style to R1C1 to rename those corrupted names... but I tried every combination to rename them, but it won't work.......
Here are examples of what I tried (as new names for corrupted names): ...