Macros within formulas

Hey all, 

Please let me know if  it is possible to insert Macros in a formula.
That is "if this condition is true, then run macro1 else macro 2". 

If the above is not possible, let me know a procedure for this. 
1> I need to create a macro which 
i) Segregates all the users by their name. 
ii) Calculate the time taken for their work. 
iii) Create a report for the time frame taken for the task. 

Now the problem is 
1) when filtered, and sorted, 
i) The time when subratcted from the previous task to present task
works. But when the first user data is finished, the time shows
negative for the second users first task time. How can this be avoided.


Please let me know if there are any other better options than the one I
am following to do this task. 

Quick help is appreciated. 

Thanks,
Pravi:confused:


-- 
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30364
View this thread: http://www.excelforum.com/showthread.php?threadid=500863

0
1/12/2006 10:01:32 PM
excel 39879 articles. 2 followers. Follow

0 Replies
539 Views

Similar Articles

[PageSpeed] 17

Reply:

Similar Artilces:

Auto change formula in cells when source is changed
Good day experts; If specific cells have the same formula for example: C1 = Product( A1;B1) C16 = Product(A16;B16) C17= Product(A17;B17) And so on ... What formula should i write in C16, C17, ... so that: when the formula in the source cell, C1, is changed the formulas in C16, C17, ... would automatically change accordingly. I tried "=C1" it does not work Thanks in advance Carlo carlo wrote: > Good day experts; > > If specific cells have the same formula for example: > C1 = Product( A1;B1) > C16 = Product(A16;B16) > C17= Product(A17;B17) > And so on ... ...

run macros automatically
i have got around 10 macros in a excel spreadsheet. i want all of them to run when i open the file. or there should be a button which will runs all the macros whenever the user wants. You can do it either way really, First create a new macro, that runs all the ten macros that are in your workbook. If you want this macro to run whenever the sheet is opened, save it with the name 'Auto_Exec' and it will run automatically when you open the book. If you want to execute the macro on a button press, you can call it any name you wish. Next you will need to create a new button, so go ...

why do i get #### in my formula cell?
I don't really know much about Excel, and my formula (it's just simple arithmetic formulas) returns with ##### displayed on the cell, with a tooltip showing the cell's correct value when I hover over it. airn, make the column wider and see if that helps -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "airn" <airn@discussions.microsoft.com> wrote in message news:C6F4DD7C-3D7D-475C-894D-0F7745735666@microso...

Recording a macro of keystrokes in Outlook?
This is odd; in Outlook I can't find how to record a macro while one is using Outlook so that it records the keystrokes. It seems, at least with a standard setup, that one can only go to the VB editor. Am I missing something? Thanks. No, you're not missing anything. There's no macro recorder for Outlook, you have to code macros from scratch using Outlook VBA. See www.outlookcode.com for information on Outlook VBA macro coding. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Exte...

How to turn macro back on?
Hello, I've a spreadsheet and I can see that there's a macro inside. However, when I try to run it, Excel told me the spreadsheet has been opened with macro disabled. There's no pop up dialog box that asks me if i will like to open the macro with this spreadsheet when I open the file. I cannot find a way to reenable the macro. So how can I turn the macro back on? Thanks. Herbert Herbert, It seems your macro security level is currently set to High. Follow menu path Tools > Macro > Security to change to Medium, so you are prompted whether you want to enable macros or...

Formula #16
I need to have a formula that can add a row of cells with a variable number of colmns. Columns will be added and deleted everyday, so the formula needs to have a variable range. I hope this is clear. Thanks, Bernie ...

simple? pasting simple formula, error on copy
I have some store buying spreadsheets I made up. Very very basic, one of the columns has a total at the bottom or end as you may call it for total $ amount bought. that final number is in c33. c1, c2, c3 etc is a amount from each vendor. I want to have a column telling me the percentage being spent on each, simple enough so I make a column with the following formula =c33/c5. I get a number, change it to percentage and BAM I have exactly what I want. I pasted that formula and pasted it into all the other rows of that certain column, but I keep getting the #div/0 error, cause the new formulas...

polynomial formula for a line graph...
Hi. I haven't looked at this feature in a couple of years. Excel can give you the formula for a charted function... what I mean is, given a few data points, it can create a best fit curve, and display the function that it used to do that... Would someone remind me where, please? Thanks. Hi, Right click the data series and pick Add Trendline. From the dialog you can choose the type of trend line and whether to display the formula. Cheers Andy mark wrote: > Hi. > > I haven't looked at this feature in a couple of years. > > Excel can give you the formula for ...

Excel formula copied down
Is there a way to copy down a column this formula =F3*A2 and have the A2 stay the same all the way down? The F3 would change on each row, F4, F5 etc. but the A2 would stay 'constant'. Thanks in advance for any help! =F3*A$2 -- Ian -- "Pat" <Pat@discussions.microsoft.com> wrote in message news:73505B29-538A-48C7-8F2F-F6126EF2126B@microsoft.com... > Is there a way to copy down a column this formula =F3*A2 and have the A2 > stay > the same all the way down? The F3 would change on each row, F4, F5 etc. > but > the A2 would stay 'constant'...

Help with creating a formula
Hello! I am trying to create a formula that will sum up certain criteria from one column as it relates to criteria in the same row in another column. For example, I want to sum up all the entries that begin with the letter "H" in column A as it relates to an entry of "2" from column B that is in the same row as the "H" entry from column A. COLUMN A COLUMN B H10 2 G01 2 H09 3 H15 2 H12 2 If there is such a formula...

Excel does not calculate my formulas
This is very strange...Excel does not calculate any formula. I can do a simple =A1+A2, and it just return a zero value. I made sure of the following: - Cell is set to General (tried it with different cell settings too) - Autocalc is on in settings (even a manual F9 calc doesn't work) -- Martin Verville We might need a few more clues: What is in A1? What is in A2? -- David Biddulph "Martin" <Martin@discussions.microsoft.com> wrote in message news:A9A25385-5BE8-4D38-A7A7-15E523C69DD9@microsoft.com... > This is very strange...Excel does not calculat...

Workbook with macros hangs up when opening, only with certain user
Chip Pearson has some notes about startup problems at: http://www.cpearson.com/excel/StartupErrors.htm Ron516 wrote: -- Dave Peterson ec35720@msn.com ...

How do I make this formula?
I have an Excel worksheet to track my 401k performance. I have a row for Date, the Balance corresponding to each date, Contributions, a formula to calculate my Total Contributions, and a formula to calculate my Total Gain/Loss. My question is, how to I get my Gain/Loss formula to update corresponding to a new Date/Balance? Is there a formula function to make the formula ignore Column data in the previous Rows? Thanks! There will be, just add/subtract items from that row. Can you show us an example with data. -- HTH RP (remove nothere from the email address if mailing direct) &...

Date Formula #3
I am having difficulty with the "NOW" formula. What I would like for it to do is when I enter a value in one cell have it update in another cell the date when the information was entered and that date stay permanenty. What I am having is the date changes to the current date everyday. Is this possible to do? Any help would be appreciated. Thanks. Todd You can do it with the change event of the worksheet This example will place the date/time in the B column if you change a cell in the range A1:A20. Place the code in the Sheet module Right click on a sheet tab and choose ...

displaying charts from Macros
I would like to create the template which will present user with several data entry forms, calculate result and then should presend result as a serie of charts with next button to show next chart. Is it possible to display just the chart windows for each chart or they have to be displayed on separate sheets. Any suggestion on what is the most elegant solution to what I want to do ? Regards, Tony Tony - The chart windows are not stable; they disappear when the user clicks anywhere else. But I don't think you really mean chart windows as such. You can make embedded charts. From Lo...

Need a formula that tags one table based 2 columns in each table
I have two tables on one worksheet, Table A and Table B. Each table contains two column with X and Y coordinates, all values are numerical. The coordinate system is irrelevant. I need to "tag" all XY coordinates in Table B that have a matching XY coordinate in Table A. If Table A coordinates are in columns A and B, and Table B coordinates are in columns C and D, then I want to place the text "hit" in column E next to each coordinate pair from columns C and D that match a coordinate pair in columns A and B. The ranges for the respective tables have been named ACOORD and...

Formula to display Count of Days in given month, using list of Start and End Dates
I have a large number of rows that contain a start date and end date. I am attempting to generate a count of days within that date range that are in a particular month, for example, Jan of 2011. Any suggestions for a formula that could be used to display the amounts shown in Column C would be helpful. Layout is: A B C Start Date End Date Count of Days in Jan2011 1/10/11 4/7/11 21 2/6/11 3/1/11 0 12/20/10 2/15/11 31 Etc. Dave, I think the best way is to create a table f...

Macros disappear after a file is imported
Good afternoon everybody, I am working on a program that exports data from an Access query to an Excel spreadsheet. I then need to run an Excel macro on that spreadsheet. Export works fine and can see exported data in an Excel spreadsheet fine. But..... If I open a standard excel spreadsheet alone and click on my macros menu, I can see a list of macros, but if a spreadsheet is exported from Access to Excel AND Excel gets opened on an automatic basis by a VBA command, then I can see my exported data, but my list of macros is blank and seems unavailable. Anybody know why? (I know Excel m...

Countif formula
Hi, I'm new here and I hope I'm posting in the right forum. I require help with a formula that has left me scratching my head for a couple of hours. I have a column of data cells that lists 3 different options, for example: option1 = Good option2 = Ok option3 = Bad i need a formula that will count how many 'Good' entries there are and to work it out as a percentage of the total number of entries (all 3 options). I hope that makes sense. If more info is required, please let me know. Thanks for your time -- godonlyknows --------------------------------------------------...

Help with Lookup/Sum Formula
I have a spreedsheet with this type of data, for example Product Group Quantity Size 2812 10 0.75 2812 100 0.75 2812 300 0.5 2817 100 0.25 2817 200 1 2845 1000 1.5 I want to be able to set up a formula that you enter a product grou (2812) in a cell and it will for that product group go and sum up al the quantities for each size. The formula would go in the Sum colum For Example ...

Trouble with copy and past of formulas in Excel
I got a sheet from one of my collegaes that was causing problems, it sometimes looses formulas (It looks like a problem with connections through our network) and you get true untrue name errors, after refreshing the cell the problem is gone. Now I'm having trouble with copying formulas, after trying some copy and paste it crashes with dr. Watson. It seems that there is some timeout problem. More people have trouble with this with the somewhat larger sheets. ...

Macro for refresh folder
Hi All, Would like to know how to write a macro in outlook to click on tools -> refresh this folder. Please help. With kind regards Oracleinform ...

Maro warning banner, despite no macros present?
I have a couple of PP presentations that I made to use for work. I will call them PP1 and PP2. With PP1, the macro warning banner appears in the .ppt and ..pps versions of this file, despite the fact that there are no macros. I have gone to the .ppt version of PP1 and removed the macros under tools and VBA editor, and even lowered the security settings, yet I still get the warning banner. I have another PP presentation that works great, PP2, however it takes about 15 seconds to open in the .pps version. I thought that perhaps the screen shots I put in PP2 made for a large fil...

Changing cell from formula to data.
Is there a way to change a cell from a formula (that is returning data) to the data it is returning. I realy hop it it becuse it would help out a ton. -- Thanks TimM If you select the cell and copy then edit - pastes special - values on the cell you will have the value and not the formula. HTH -- Sincerely, Michael Colvin "TimM" wrote: > Is there a way to change a cell from a formula (that is returning data) to > the data it is returning. I realy hop it it becuse it would help out a ton. > > > -- > Thanks > TimM Hi, Select the cell(s) contain...

Struggling with formula
Hi I have a spreadsheet withthe following data: 28/08/2008 09/05/2008 HINGE SA28553 8 =A31.10 =A30.77 =A36.16 28/08/2008 09/05/2008 HINGE SA28566 8 =A31.10 =A30.77 =A36.16 20/08/2008 28/08/2008 HINGE SA28389 24 =A31.10 =A30.77 =A318.48 14/08/2008 21/08/2008 HINGE SA28268 12 =A30.00 =A30.00 What I need to see is the total number of units, of which XXX are Free of Charge between xxxx date Sorry, but I am struggling and got so far =3DCOUNTIF(J2:J924,"=A30.00") but struggling with the rest, can anyone help Ta BabyPink, In general: =SUMPRODUCT((FirstDate<=Date"))...