I have a workbook which contains 12 sheets, 1 for each month of the year. I also have over 100 sheets, 1 for each agent that covers their stats for each month of the year based on some of the cells from the monthly sheets.
I am trying to drag the formulas over but it will always just refer to January, instead of January and then next cell refers to the February tab, etc, etc.
I have a workbook with five different sheets in it.The first is an inputs sheet where I populate inputs to my file. The rest all contain formulas in a top row (ex: A2:G2 in the first sheet D4:M4 in the second sheet...etc). These formulas are calculating values based off my input sheet and need to be dragged down the same number of rows as is in the inputs sheet (if there are 125 rows in my input sheet I need it to drag down the formulas 125 times, so from A2:G2 to A126:G126 or D4:M4 to D129.
The main problem is that I never know how many rows will be on the input sheet so the piece of code would ideally count and then apply that count to all of the other tabs and drag down the appropriate amount of rows. It is a base file so I save a copy each time I open so the start rows will always be the same.
Is there a way to select cells with formulas for a top row and then fill down the formulas for these non adjacent, non-contiguous, etc. columns? I can paste a single formula, but not varying.
i.e. Cells A1, D1, and G1 have my formulas, and I want to identify that they have formulas in the first place and then drag down to let's say A10, D10, and G10. I will not know which columns contains cells before hand, and the given formulas are not fixed
I'm wanting to do is drag a formula down and it drop to the next cell rather than the same row number I'm on. For example I'm trying to concatenate a list of phrases whilst changing the main word. Here's an example of the excel sheet
Base Terms Phrase Result car red van blue bus red blue
There is meant to be a space after the second red and blue enabling me to make (in order), red car, blue car, car red, car blue
How can I make it so I've done the relevant concatenate formulas for A2 with the B column and simply drag it down and Excel will switch from A2 to A3 and so on when I've dragged out the 4 formulas?
Private Sub Workbook_Activate() Application.CutCopyMode = False Application.OnKey "^c", "" Application.CellDragAndDrop = False End Sub Private Sub Workbook_Deactivate()
OR This one:
Option Explicit Private Sub Workbook_Activate() With Application .CutCopyMode = False .CellDragAndDrop = False
I noltice that one uses "Option Explicit" and one doesn't, one seems to be longer than the other, but when I tested both, they both seem to do the same thing. I did notice that neither one of them prevents a "paste" into the worksheet when something is copied from an outside source, but that is not a concern right now!!!
'To delete delivery address lines if 1st line empty If IsEmpty(Range("deliver_line1")) _ Then Sheets(1).Range("deliver_rows").EntireRow.Delete 'No End If required as only one action as a result of the If
A spreadsheet based on my template has been sent to me because the macro won't run properly. When I try to run the macro I get a Runtime Error '1004' Method 'Range' of object '_Global' failed on the following line. Columns("A:E") = Columns("A:E").Value.
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.
I am looking for a way to get a spreadsheet to automate calculations of unit costs based on variable packaging names.
I have a series of packages that are denoted by text phrases. Examples:
4/6/12 2/12/12 6/4/12 18/12 24/12
For our purposes let's say the package names above will always be in column A. Column B contains the frontline price of a case of product represented by the phrase in column A. Column C will contain the cost per unit of product - this is obtained by dividing column B by the number of each package arrangement that can be found in one case. Most of the time the number of package arrangements per case is denoted by the very first number in the package name (ie, 4/6/12 would be 4). This won't always be the case though (18/12 would be a package arrangement of 1).
I am looking for a way for the spreadsheet to do all of the following and return the results in column C: if the package name contains "4/6/12", divide column B by 4; if the package name contains "2/12/12", divide column B by 2; if the package name contains "6/4/12" divide column B by 6; if the package name contains "18/12", divide column B by 1; if the package name contains "24/12" divide column B by 24.
I want to be able to open the Excel spreadsheet, and have some easy way to post formulas into that document. I was thinking a Macro would work, but I cannot seem to find a way. Columns A through V contain the data that is exported from the payroll system. I want to find a way to paste my formulas into W2:AH200. The formulas will always be the same.
I'd like the user to be able to:
1. Export the payroll information to Excel and open the document. 2. Run a macro (or some similar action) to place the formulas in W2:AH200 into the spreadsheet. 3. Input data into AH2, AH3, AH4, and AH5.
A sample document is attached. Columns A-V are what get exported by the payroll system, and W-AH are my formulas I've added to this sample (and what I want to be able to easily add to new spreadsheets).
How pasting values/formulas only works. I have a spreadsheet I've been using to record product sales, commission, shipping etc. It currently has three pages of records. But now I have a new spreadsheet I want to use with basically the same 'look' as the old one (same columns, entries per sheet, etc) but using better formulas. I don't want to manually input all the data from the old one and I thought I could copy all the cells from the old one and then paste values only into the new one. But when I do that, it pastes the values but also deletes the formulas in the new one. So then I thought I could copy all the cells from the new and paste only formulas into the old one but then it deletes all the values in the old one. Is this what is supposed to happen? And if so, is there a way to achieve what I want?
I have this macro below written. It isn't working for me and I am trying to figure out how to write it. Basically, the macro is supposed to go to the test.xls workbook and then look at names in row 4, from there it will take each name and search for it on the all csrs new.xls workbook and then move over to the right 5 times and copy data and paste 1 down from the name on the test.xls workbook. One workbook has the names going to the right and the other workbook has the names going down....
I would like to add another step that pastes the formulas copied from the active sheet, to specific ranges of cells.
I would like the PasteSpecial XlFormats to apply to all cells on the active sheet, where as the PasteSpecial xlValues would only apply to all cells not in the ranges that the Formulas are getting pasted into.
Also for formatting purposes I have a few cells that are merged in the active spreadsheet, that unmerge when I run the macro. Ideally I would like any previously merged cells to stay merged once the macro is run.
Below is the VB I have...
Sub SaveSheet() ActiveSheet.Copy With ActiveSheet.UsedRange .Copy .PasteSpecial xlValues .PasteSpecial xlFormats
I have created an Excel template for others to use. They can enter data in certain unprotected cells and the data is linked to other places in the workbook. If they Cut and Paste something in the unprotected cells, the formulas get a REF#. There is no problem if they Copy and Paste. How can I prevent the REF# error without resorting to VBA?
I have a formula which i need to paste into a worksheet, doing this is tedious and boring to say the least, problem is i am not sure how to get the macro to skip blank lines and only insert the formula where there are prices. Each week the worksheet changes so there is no consistent layout.
This is probably a simple one but I can't figure it out. I am building a workbook from scratch. It has about twelve of thirteen tabs at the bottom. On one of the tabs I would like to copy and paste a stand alone worksheet. The worksheet functions properly when it is stand alone. However when I copy and paste the worksheet into this new workbook none of the formulas transfer with it. I do get the cells filled in, but I would like to get the formulas.
I have done this before and it worked fine. In fact I can open a new workbook and copy / paste the worksheet into it and everything works fine. Again when I copy / paste it to this new workbook the formulas do not transfer.
I was wondering if it's possible to copy and paste formulas to a brand new excel sheet. I created an excel sheet with some forumlas but when I try to copy and paste it to a new page it only pastes the values and not the formulas.
Is there any way to transfer the formulas as well?