How would you calculate the amount of days of a billing period for a consulting engagement by quarter when the engagement could span multiple quarters, be within a quarter or not be in a quarter at all? Project based billing
how to create a barcode in an excel spreadsheet? I am trying to print out a sheet that includes a code 128 barcode of a specific number that I type in.
I want to create a macro button that can create copy, insert, paste and rename the new sheet in next month's name, like if the active sheet's name is January, I want to copy the whole sheet of January, insert new sheet, paste the new sheet and rename the new sheet to next month like February?
Also rename the new sheet (February) cell B3 the same as new sheet's name (February)
So if month of February is near end, the macro button in February will create the same way as Jan did which means the next sheet will be named March and so on.
I'm trying to add buttons to an excel spreadsheet at runtime. Each row in the spreadsheet should have its own buttons. I was able to create and edit them with the ActiveSheet. OLEObjects.Add() function, but after that, when i was trying to create code dynamically to react on the buttons' click events excel crashes (actually it works for one button, but not if my routine for adding a new button and event code is called more than once in a row!)
The code below works if the AddCmdbuttonWithCode() is called once, but crashes if it is called two or more times. Excel tries to restore the document after the crash and the first button and its corresponding click event code is visible and works... but NOT the second button and its event code...
The only way I can create multiple buttons right now is by calling my method once per click, opening the vba editor, changing the parameters for my AddCmdbuttonWithCode() routine and execute it again. After that I have mutliple buttons in different lines which all work fine (so the concept seems to work).
The problem seems to be the insertLine method, since everything seems to work if i leave it out (except for the code generation of course, since this is done by this part of the code :-) ). Is it possible that calling the insertLine Method can't be called multiple times? I don't know... any ideas? Feel free to test my code - it's small, easy to understand and has comments.
'this code calls the method which creates the buttons in specific cells with specific names Private Sub CommandButton3_Click() 'the first call always works! AddCmdbuttonWithCode "Edit_111_111_114", 23
'the second one crashes excel AddCmdbuttonWithCode "Edit_111_111_115", 27 End Sub
So I have a guest list workbook. There are two sheets. On the first one is a list of names on Column A. On Column B is a classification: 'C' if confirmed; "D" for declined; "I" for pending. I want to have all the names with "C" on sheet 1 appear on sheet 2 automatically.
I need to create a macro that will scan a spreadsheet for the number of sheets and then pull data from the same places on each sheet in order to create a summary sheet. Let me try to explain a little better.
The spreadsheet I'm working with has a separate sheet for each new deal our company makes. Each of these sheets is in the same format - we use a template and fill in the data based on that whenever a new deal emerges. The sheets contain basic info about the deal in the first few rows and columns, then some narratives with dates describing the progress of the deal, and then a list of issues and whether or not they have been resolved. The problem is, each of these sheets contains too much info for a quick, high-level overview with the bosses so they've asked me to create something that will pull the basic info, the most recent narrative, and any unresolved issues from each sheet. This way, each time there's an overview scheduled with the bosses, the macro can be run and it will create a new sheet with data from each sheet in the workbook.
I have a workbook with a hidden sheet ("Template") and a visible sheet("New Job"). I need code so when cell F1 in "New Job" is populated:
1-the sheet is renamed to the value of F1, 2-a new tab is made (a carbon copy of the hidden sheet "Template") 3-the new tab is named "New Tab" and marked as unhidden.
Public Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.Name = Range("F1").Value End Sub
Function WorksheetExists(SheetName As String, _ Optional WhichBook As Workbook) As Boolean Dim WB As Workbook Set WB = IIf(WhichBook Is Nothing, ThisWorkbook, WhichBook) On Error Resume Next WorksheetExists = CBool(Len(WB.Worksheets(SheetName).Name) > 0) End Function..................
EXAMPLE: Complete Sheet called "Day1". When day1 is complete you click on button and it then copies itself and creates and renames new sheet to "Day2", then when "Day2" is complete you click on button and it then copies itself and creates and renames new sheet to "Day3", and so on and so forth to "Day30".
I have about 100 products and each has its own sheet that I fill with data. Once I have finished with a sheet I rename it and create a copy and then hide the original and delete the entered data from before and start over.
Is there a way I can make it so when I hide a sheet it will automatically create a copy and delete a specific range?
On Error GoTo ErrorHandler Dim createsheet As Integer createsheet = MsgBox("Do you want to Create a Sheet for Uncontrolled Discharge?" & vbNewLine & "NOTE: if the sheet already exists, you cannot create a sheet with the same date - select NO", vbYesNo, "Caution")
[Code] ...
ErrorHandler: MsgBox "There is already a Sheet Created for that Date.", vbCritical End If
Right now...it will pop up the error message but it will still create a "template" sheet with the suffix (2), (3), etc... instead of canceling the create new worksheet operation.
i have a sheet called 'sample database'. it consists of 56 columns, each with a specific title in row 1. i.e. name, surname, mobile_number, and so on. from row 2 onwards the data has been populated for roughly 200 rows.
i have another 'Capture Sheet' which has the same titles as 'Sample database' except it's in a different format. its a printable form that is given to new employees when they start. once they have completed it it gets captured into the 'Sample Database' sheet.
my wifes boss now wants 1 new sheet for each row in the 'sample database' sheet based on the format/layout of the 'capture form'. how can i get the 'capture form' to auto populate the data from the 'sample database' sheet and create a new sheet for each row? i know this is possible i just dont know how to do it.
Need function to calculate the end of quarter for a given date after adding any number of months to that date. Example cell A1 would contain 01/15/2010. I want to add 6 months to A1. A2 would contain 6 making it 07/15/2010, B1 would contain a function that would display 09/30/2010.
I have some buttons in different sheets in an excel file, each button has its own code, that is the reason I can not move the code related to each object to another location (sheet or module).
And I have one piece of code in Module1 (Auto_load) in order to execute automatically this routine every time file is opened. Inside "auto_load" routine I initialize some values of some check buttons,options buttons and positions of some objects in diferent sheets, but I can not pass the value of variables between Module and Sheet's code even when I declare as public variables and/or function.
I want to create a loop, that copies the cell B11 from each sheet, and creates a new sheet called "Average". In this sheet I want it to add sheetname in column A, and in column B the value fetched from that sheet..
I need to be able to check if a certain worksheet exists in the active workbook. If that worksheet does not exist I need to make it. I already have the code for creating a new worksheet but I'm not sure how to check if the worksheet already exists.
In another sheet I have "Project " , " Start " "End" . I need to find the start and end quarter and fill in. The output should be "
HR 2014/Q1 2015/Q3 crm 2013/Q1 2017/Q3
ATTACHING A FILE- In sheet- raw data - i need to search on ID- and in "Test.xlsxData" i need to fill in the start and the end date- as shown in Data sheet.
Formula to get the Quarter number for the highest profit per Product, like in B16:F16.
The excersiser instracted us that it must be with one formula with no Macro, not User Defined Function and not openning additional colums.
I know how to find the qtr. Number - like for A2: =INT((MONTH(A2)+2)/3) but I am lost in finding how to combine the calculation for the Qtr and the most profitable Qtr. probably with MAX on SUM.
I have been easily identifying the bottom quarter of data using =IF(G2="","",IF(RANK(G2,G$2:G$100,1)<=INT( COUNTA(G$2:G$100)/4),"Yes","")) Now I need the top quarter and am not sure how to change the formula.
I have tried changing <= to >= but I then get the top 75% rather than 25%. I have tried adding +50% and +.5 ... =IF(G2="","",IF(RANK(G2,G$2:G$100,1)<=INT((COUNTA(G$2:G$100)/4+50%)),"Yes",""))
I am using the code below that I got off of these forums to email a particular sheet in my workbook, but I need to strip all of the VBA code and the command button from the sheet being sent.
I have a vba module that reads a value from a txt file and saves that value in a variable called "iniInfo". I want to permanently assign that value programatically by using VBA code to create a Public variable e.g. "PUBLIC CONST conFIg = iniInfo" in my modGlobalVar Module. (Of course, this would only create the code if the "conFig" variable doesn't already exist.)
I have a spreadsheet that tracks all field equipment inspections. This year, certain equipments will need to be inspected twice a year. Ideally, if it was inspected in Quarter 1, it needs to be inspected again in Quarter 3 and if it's Q2 then it'll be inspected again in Q4.
I need a formula that will tell me when the next inspection is due.
This is what I have so far: Column I (Formula): date of last inspection Column J (manual entry): "yes" for equipment that will be inspected semi-annually Column K (formula): The Quarter is was inspected based on Column I's date Column LThe quarter the next inspection is due