I have a file with the following code. When the file is used on a PC, the code works properly and the result is Print Preview. When used on a Mac, the print job goes to the printer rather than to Print Preview. Can this code be adjusted so that it works on both a Mac and a PC?
Sub PrintEstimate()
Sheet1.Names("Print_Area").RefersTo = Sheet1.Names("Print_Area2").RefersTo
Sheet1.PrintOut Preview:=True
End Sub
I am trying to create formula that will show overtime worked in a given day. The code I am using is a simple one ([ cell - 8], for hours worked). The problem is when the time cells are blank/not used it shows a -8 in the cell. what I need to do to create a code that will eliminate the -8 from showing. The cell its self is taking the result from another cell with a formula and then subtracting 8 from the result of the formula in the other cell.
I have a range that has formulas that are based on other fcells outside the range.
What I want to do is, if the cell has a value to remove the formula and paste the results. If the filed is blank (no results from the formula) to leave the formula in place.
There could be a marco to run when this process is needed.
I have a workbook that calculates the total sales per agent but looking a datasheet. At the bottom of the sheet I have 4 team managers who look after a group of agents. I need their totals to me calculated by summing each of the agents in the teams.
I have tried to create groups per team_manager using my team_ref_sheet. On this sheet I have Defined Names / Named Ranges which I thought would work for doing these calculations, but this does not seem to have worked.
As of today, the entry EMPLOYEE is sometimes written as it was EMPLOYEE, and sometimes as EMP. I have to add these two together. How do I change the code of the macro?
I tried "=IF(ISNA(VLOOKUP(""EMPLOYEE"",C[-16]:C[-14],2,0)),0,VLOOKUP(""EMPLOYEE"",C[-16]:C[-14],2,0))"+ "IF(ISNA(VLOOKUP(""EMP"",C[-16]:C[-14],2,0)),0,VLOOKUP(""EMP"",C[-16]:C[-14],2,0))"
as I would in Excel, but of course it doesn't work.
I have a monthly work phone bill which I receive as an Excel document. I have to pay for personal calls and want to create a list of personal numbers which can be filtered and the costs summed. Prefereably an add in would be best. Possibly 2 icons, one for adding my personalised numbers (usually under 10 numbers). This could be saved to my home drive on the network so I can run the formula from any PC on the network.
The other icon would be to run the report and do the calculations. So it only really looks in 2 column (mobile num, cost).
Is there a "simple" way to "kill two birds with one shot"!? In the attached WB I wrote a small UDF in order to Multiply A1*B1 whenever it is used in a cell at an ODD row number, - and Add A1+B1 when used in a cell at an EVEN row number. As far as I know it was given as an exercise to a class of students in a European University.
Upon opening the WB - the UDF presents the correct results, BUT when A1, or B1 is changed the results get corrupted. If you press [F2] and hit [Enter] in each colored cell - the results get back into order. My question to you is very simple:
a) Where did I go wrong ? b) Is there a different UDF that can provide the requested results and being Volatile at the same time ?
(the range 940:979 is a filled with investment funds data all within a particular sector, this formula for example will return the name of the number 1 rated fund, ie "mega star cash")
However, the above assumes that the ranges specified wont change, but they do, frequently and there are over 300 of them, so I earlier got help to create the following formula which can tell me what range a certain set of data lies within:
(so I tell this formula to look at a specified sector name 'cash funds' and by tweaking the number in bold it will return the range of data that i want to feed into the first formula, ie it will return D940:D979, DJ940:DJ979 and DG940:DG979)
If the data ranges change then these cells will dynamicaly update, either the range will shrink or grow - which is perfect - what i want to know is if i can integrate this into the first formula, so if you like it becomes completely dynamic.
I have made this UDF to narrow down results to more suit my selling environment. In the NHS UK there are many job roles but for me I need to know if they are a doctor (GP), nurse (Nurse), Pharmacist (Retail). There is some broadness in the NHS and it's workings but for me I just to know what general category they fit into.
Problem I have is that when I use this my spreadie takes about 10 minutes to update (I can be looking at 15000 records at anyone time). Is there anyway of speeding it up or should I just percivier?
Function PHARbase(cell) Select Case cell Case "General Practitioner" PHARbase = "GP" Case "CLINICAL ASSISTANT" PHARbase = "GP" Case "GP Registrar"
I have created a simple SUM formula to add cell values across six sheets in the same workbook. I see the result when I use the formula button but the result (number) does not appear in the cell. All I get is $ -.
I wan to create a table using 2 column of data.Below are the data
Type Name A Danon B Chris C Hilton A Jin A King B Ling C Seng D Aaron B Halim
I wan to convert these data to a table which have four dimension. A, B, C, D. With Vlookup function, i can do it. But, i find difficulty when the result is overlap, when in the type A, got Danon, Jin, and King. My result only can lookup is King. Other cannot display.
attached the file. Sheet1 & Sheet2 are the "Source" sheets and "Summary" sheet is the "Target" sheet.
1) Macro "TopParts1" filters the Top 80% (Column B) in Sheet1 and copies this to A1 in the "Summary" sheet.
2) Macro "TopParts2" filters the Top 80% (Column B) in Sheet2 and copies this to E1 in the "Summary" sheet.
What I am hoping for is to combine the macros 1) & 2) so that the Table as shown in "Summary2" sheet is done in one instance. The highlighting is just for illustration. Presently I need to select sheet1 rum the 1st macro... select sheet2 run the 2nd macro. Not very efficient. One table for 1 macro would be excellent.
I have a sheet with Product IDs and amounts. A Product ID may occur more than once. I want to sum all amounts for all occurrences of each Product ID. (see attached file)
I have written the following code, but as you can see, it is returning an error, so I've done something wrong. I'm also getting a Compile error: "For Each control variable must be Variant or Object"
Function GetTotal(PO_ProdID As Range, LURng As Range) ' ' Function to Lookup Concatenated PO # & ProdID ' & Return the Total of all dollar amount listed ' Dim ce As String, tot As Long tot = 0 For Each ce In LURng tot = tot + ce.Offset(0, 1).Value + ce.Offset(0, 2).Value Next ce End Function
I have a large table which I am filtering 3 times. There should be results but the final VBA filter does not return them until I manually apply the filter. The custom filter is correctly populated with the criteria. The code that I am using is as follows:
The first two filters work fine. The last does not. Oddly it works on some date picker values and not others, even if there are actual results and as mentioned earlier if I stop the program running and apply the filter (without typing anything else) it works fine.
I would like to be able to bring these results into an output, but without other members of the other team members results been seen by other memebrs of the team
Worksheet1 has data. Worksheet2 uses VLOOKUP back to worksheet1 for data to populate cells on worksheet2.
The VLOOKUP command below returns a value of 126 to cell C6. I want to use the number result of the VLOOKUP in C6 (126) as part of a calculation for another cell. In thiscase, cell D6 is keyed in. I want to get the result of =(N(D6)-N(C6)) and put it in cell F6. To further complicate things, if C6 is blank, I want F6 to be blank.
VLOOKUP formula that returns a value of 126 from worksheet1 and puts it in cell C6 on worksheet2. It also returns a blank if there is a blank on worksheet1.
I attached my example with this message, I want the cell Z6 for instance to make the sum of the "X" of the same record based on their "weight" in the gray ribbon respectively.
Transferring Multiple Data from separate worksheet without duplicating"
As you can see i am looking for information in column d (Letter) and getting the result to show from column B (number) using the formula in Column G (result 1).
The problem i am having is that if i try to copy or drag the formula down into Result 2 i just get the same answer.
Is there any way for the next cell down to ignore the previous result?
Add together D3+G3+J3+M3+Q3+U3 and put the result into W3? I think the reason it wont work is because there will not always be a value in D3/G3 and J3/M3
I am using this formula. How can I get it to pull 'Sales Materials'!$F17:$F69' and display along with 'Sales Materials'!$B$17:$B$69 when my logical statement is true.
=INDEX('Sales Materials'!$B$17:$F$69,SMALL(IF('Sales Materials'!$E$17:$E$69="YES",ROW('Sales Materials'!$B$17:$B$69)-16),ROW(A1)),1) I've tried using * but I think something is going on with "-16" which I was told to you use to account for headers.
I have a spreadsheet which matches Reference numbers in Column A against Column B and vice versa; and assigns unique or duplicate values. I would like to be able to count the number of duplicates and uniques giving a total of how many appear in the spreadsheet. I've attached the spreadsheet to give you an idea of what its like.
I have a very large spreadsheet (almost 9000 rows). I have filters on all columns, however when I click to see all the results for the column under the filter, just to view the contents of the row, some are not there. Does a filter have a limitted amount of rows it can hold.