Filter And Copy Selected Cols To Another W/s And Add Equations
Aug 22, 2009
I need to automate the attached as per the following (by not recording macro unfortunately).
Sheet one has a dump of data. First, I need to change the data format from yyyymmdd to dd/mm/yyyy. Then I need to filter for region EU and only copy the filtered data from columns A, C-D, F and the difference from columns I-J to Sheet 2. Then in Sheet 2, I need another column to calculate the difference per unit.
After posting a thread regarding sorting issues with multiple columns (under the thread heading "Bulk Sorting" I have conceded that unless I have a sort filter on every column I will not be able to keep data in respective rows when sorting. My new plan of attack is to insert an empty row (it will be row 13) and apply auto filter across every column (not what I wanted visually but no other option).
Is there a way that I can do this at row 13 on an almost completed sheet? I may just be dumb but I can't stop the filter applying itself to row 1. If I select the whole of row 13 the auto filter or "right click - apply filter" options aren't available. If not I could start a fresh sheet. Is there a way to copy and paste a large amount of cells with different width columns into a new worksheet?
In Excel, I have a table which tracks current issues on equipment and I simply use autofilters to narrow down my search.
The data starts at cell A10 and I want to be able to have a cell, say A1 for example, that can reference the filter option selected.
For example, if I select a filter on column A, then select ABC001 to filter on all ABC001 entries, can I reference the filter selection so that cell A1 indicates the filter I selected and displays ABC001?
I am trying to make a very easy to understand sheet for directors and want to make it quick and easy.
I would prefer to do this in a formula driven manner rather than using macros if possible.
I need to discern the first row where columns B or C or D or E become non-zero. This is because column A countains dates, and if I subtract one day from the date in the non-zero row I have the date of the analysis I'm examining.
The problem i have is that the code I've put together below gives me the date of the absolute last row in the spreadsheet, "31/12/2015 23:30:00" from row 70129 which isn't that useful. I'm expecting a date in August just gone which is on row 11618.
Code:
Sub test() Dim lngLastRowU1 As Long Dim lngLastRowU2 As Long Dim lngLastRowU3 As Long
I have two pivot tables, both of which source the same sheet of data. Each record in the data has two fields, Region ID of person and Region ID of facility, that reference the same list of Region IDs via vlookup (it's just numbers 1-12). Either one or both can be blank. One pivot outputs counts by person Region ID, and the other, by facility Region ID.
Using a combination of nested IF statements and vlookups, I tried making a third Region ID field that could be used as a slicer to control both tables, but what I end up with is an undercount in one of the tables. The only thing that works so far to output the correct counts is having two separate slicers, the facility Region ID being the slicer for one and the person Region ID being the slicer for the other. If the end user wants to see counts for one Region ID, they have to manually set one slicer equal to the other. But what we want is just for the end user to be able to control both tables just by pushing a single number, Region IDs 1-12.
I can make one of the slicers hidden but then how do I get the hidden slicer to automatically select Region ID values equal to the nonhidden slicer? Alternatively, I could somehow program a combo box or list to control the two different slicers, then the slicers would be hidden and the user would see only the combo box/list. (I guess in either of these alternatives, I could just use a report filter instead of a slicer; either way, I still have to get items in one to automatically select based on the user's selected items in another).
FYI, some of the options I looked up involved PowerPivot, which I do not have access to. VBAs/macros are ok.
i want to do the same thing with the formula below, but for columns (i want to use the value in cell cw106 on sheet "POINTS" as the upper limit & cw107 as the lower limit.
Columns("aE:aF").EntireColumn.Hidden = True
i tired it like this and it wouldnt work Columns(Sheets("POINTS").Range("cw104") & ":" & Sheets("POINTS").Range("cw105")).EntireColumn.Hidden
I'm trying to Filter a list by the criteria selected in a listbox, and activated by a command button. My problem is the sort criteria. I have 11 regions, numbered 01EPS through 11EPS. Sorting by any of these criteria works just fine.
The problem is that I also want to be able to sort by ALL of the regions at once. I can do this by using a custom filter. I recorded a macro to see what the difference was, and it simply a matter of changing 01EPS to "=*EPS". However, adding that to my case list results in an error message of "Compile Error: Syntax Error".
My excel file was imported from a 3rd party and has many blank rows across the entire sheet. I want to delete these rows if every cell across is blank. How is this accomplished?
I tried the formula "=isblank(C2:C18)" however I get a "False response on those rows that are completly blank.
i have data that will vary from item to item in the $ of rows associated and the # of columns to be dealt with.
item1 Line 1 Line 2 Here i want to have a formula put and copied across X columns item2 Line 1 Line 2 other data going across in the columns Line 3 Line 4 Here i want to have a formula put and copied across X columns item3 Line 1 item4 Line 1
get my meaning??
columns involved will be known before i get to this bit of code !! as an example lets say it's 8 columns
using the record macro i get this bit of code
Range("E14:M14").Select Selection.FormulaR1C1 = "=SUM(R[-10]C:R[-1]C)" This is fine but i don't know what row or the columns are before i run the macro so the Range ("e14:M14").select wont really work.
I've sent sometime going through MRexcell searching for tips but found nothing also googled for dynamically pasting across unknown columns
this is close to my idea in my mind conceptually Range("C2:C" & LastRow) but it doesn't make the columns dynamic eg column 8 being = H and then P = 8th column on and the last with data.
From the above thread I am using the following macro...
Sub MoveOver() Dim MoveRange As Range
Application.ScreenUpdating = False With Range("B1", Range("B" & Rows.Count).End(xlUp).Offset(, 21)) .AutoFilter field:=1, Criteria1:="=C&P" On Error Resume Next Set MoveRange = .Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible) On Error GoTo 0 .AutoFilter End With If Not MoveRange Is Nothing Then MoveRange.Insert Shift:=xlToRight End If Application.ScreenUpdating = True End Sub
I am getting an error 1004 message saying cells cannot be moved off of the spreadsheet. However, my last cell on the sheet is J28956.
Columns B through J contain data. Columns beyond J do not contain data.
Can someone give advice on getting the macro to work.
I know there have been many posts about multiple conditions in arrays, but I didn't find one that applied to my situation, so I'm hoping can help me out of jam. I'm using Excel 2000 on XP.
I have a database of sales information. Customer name is listed in column C, and columns F through Q contain the sales for the months of July - June (fiscal calendar year), with the headers for the months in row 4. There can be many rows of sales for the same customer, hence the need to sum them.
Example
C F G H CUSTOMER JULY AUGUST SEPTEMBER customer1 2 3 4 customer1 2 3 4 customer2 2 3 4 customer2 2 3 4
The problem is that this information will need to be updated every month to reflect sales year-to-date, meaning that the conditions for summing the data will change depending on how far into the year we are. So for instance, in August I will need to sum all the records for customer1 in the July column (column F) and the August column (column G), but next month it will have to sum the records for customer1 from July, August, and September (col H).
The result of this information would be displayed on a different worksheet. My thought was to assign a range of 12 cells (Sheet2!A1:A12) and to populate those cells with any of the months that need to be summed thus far. So for example, through September, A1 = "July", A2 = "August", and A3 = "September". Then the formula would use those values to evaulate the conditions. So in plain English the formula would:
sum the values in columns F : Q where the monthly header = the values in the range Sheet2!A1:A12 for all records where CUSTOMER = CustomerName
I have 40000 rows of data to check. I always filter Column E by Suppplier Name, like supplier Alpha or Bravo,Charlie,Donkey, or Elephant,France,Goal etc.
What I manually check is I filter the column E by Alpha, then I will get some 5000 rows of data of Alpha, I will look if all the rows in Column B contais "-3digit" numbers like -123,-548 etc if not I will assume its incorrect and copy the entire row and put it in next sheet.
If Column B is right that is, if it contains -3digit then I will again look in Column F ( Invoice Numbers) the invoice number should always be 5digt-4digit all numbers without space or any special charactors except Hypen(-). It may have 5digt-4digit-5digit-4digit etc, if any values doesnt match with the said criteria i will again assume it as incorrect and move to the next sheet.
Now once this is done i will filter againn Column E by "Bravo" all the conditions are same, that is if the supplier name is Alpha Bravo, charlie, Donkey, or Elephant then i will do all the checks mentioned above or else i will ignore all other supplier....
However, I need to alter this to work for inserting more than one row at a time. ie. the user selects 'x' number of rows and 'x' rows are inserted below (in the same way 'Insert Row' works in Excel) and the row above the selection is copied down.
I have an issue with an export file which is produced in CSV format and needs to be aligned. I have attached a sample of what I refer to.
My Source excel file looks like:
ABC A-101 B - 202 DEF B-203 C - 100
The destination should align with the relevant column headers and place a blank if it doesn't match. Other have queried a similar thing, however my header and data and description is actually in the same cell with a dash separating them.
The output I want is:
A B C D ABC 101 202 DEF 203 100
There are multiple row of employees with varied column headings as its dependent on what system access the user has. The headings i.e. A,B,C for example is a fixed number of headers.
In my real data set the headers represents a 3 letter system prefix e.g. ZCR,ILP etc
Above is the polynomial equation of a trend line as shown on my chart, I have extracted the numbers into separate cells using LINEST, so now I have in cells A20 to E20 the numbers 1.083333333, -7.333333, 16.416667, -6.16667 and 4 respectively.With a "y" value of 25 how do I go about solving for a value of "x".
I've been stubbornly struggling with this on and off for a couple of weeks now and I'm not getting any closer to working it out and the websites I've found explaining the procedure all seem to go over my head by the time I get into the fourth or fifth paragraph.
I was wondering if the solver was the only way to solve implicit equations. I am looking for something that will automatically solve an implicit equation after the appropriate information is entered into the referenced cells.....
I don't actually own Excel as yet - but I'm wondering if someone could tell me whether Excel is capable of solving what I'm told are 'polynomial equations'. An example of the sort of equation I hope to solve is: d/(1.18 + d) + d/(1.86 + d) + d/(9 + d) + d/(8.8 + d) = 2 d=? {I happen to know d = 3.65(approx) in this example btw}
but I get an internal memory error. However, if I use the solver dialog box directly from excel and not through a macro and keep the 'Set Target Cell' as empty, I get the right solution.
I'm trying to find definitions/commands to make excel find the best combinations of several defined scopes and restrictions to make an output number as high as possible.
This is by using a combination of several different equations, maybe excel has a magic trick for all the variables and formulas.
I am trying to analytically solve an equation to establish a physical value. Unfortunately, it's difficult to do the algebra, so it needs to be done this way.
I have an experimental value for this in "J2", so what I want to do is change F2 to that "I2" is equal to "J2"
Is it possible to get excel to match these values - I have about 200 different cells of this?
The formula is in cell "I2" =B2*((1-(C2/D2)*((F2/G2)^1.2))^-1.5125)
I am about to take a corporate finance course. The textbook uses a ton of basic (complex to me) equations to calculate interest rates, bond premiums, dividend reinvestment scenarios, etc.
I know that Excel has a bunch of specific functions to calculate interest, NPV, etc. but I am NOT interested in using those because I would like to have Excel "do the math" once I enter the formulas (or parts of formulas) correctly.
how to enter the equations below into Excel without using built-in formulas (I'm also not looking to use the Equation editor because I actually to calculate the answers, not just have the visual look/feel of the equation).
1R2 = [(1 + .0194)(1 + .03)]1/2 - 1
If done correctly, 1R2 in the above should equal 2.47%. I am totally fine doing parts of this in separate cells if necessary.
And something more complicated like the below. I wrote out the word "delta" because I don't know how to create the "triangle" symbol for delta on this forum post. According to the text, for securities with semiannual receipt (compounding) of interest, it is represented as:
-D = (delta P / P) / ((delta r sub b) / (1 + (r sub b)/2)))
Or in English, I believe that can be expressed as "negative D equals the quotient of delta P divided by P (in the numerator) divided by the following: delta r sub b divided by the quantity 1 plus r sub b divided by 2"
And finally
V sub b = 1000 / [1 + (.10/2)]2(4) + 50 times the following compound bracketed expression [1 - (1 / [1 + (.10/2)]2(4)] divided by (.10/2)]
Any way to exclude colored cells from addition in a column. I will attach a simple example document.
I am building a spreadsheet to keep track of my monthly spending, and debt balance. I keep track of the total amount of bills I pay each month. As I pay them, their respective line is highlighted green in the spreadsheet. I would like to create a macro/formula which would sum the remaining cells in the column which are not highlighted to display the remaining monies which need to be paid out. I'm not sure if this matters but I am using office 2010.