'To delete delivery address lines if 1st line empty
If IsEmpty(Range("deliver_line1")) _
'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 am trying to create an inventory list that automatically updates the supply quantity when items are taken away from inventory. I have created entry cells where the quantity of items taken out of inventory can be entered (example, cell F2 of the attachment), and the new overall inventory count is adjusted accordingly for each stock of items (example, cell B3). These automated adjustments are repeated for each subsequent row for every time items have been taken from inventory and recorded.
I managed to get it to do what I originally intended with exception of the fact that it still present values on rows where there were no activity - or quantity of items taken from out of inventory (row #6 and beyond of the attachment). Is there a way of "hiding" these values without removing the formula, or possibly set conditional formatting where no values are displayed if no changes in inventory has been entered?
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 an existing macro that copies a worksheet and pastes it into another workbook, renames it and then attaches it to an email. My problem is that it pastes just the values. I need it to paste part of the original worksheet as values and part copy the formulas. So on the new workbook Columns A through F will be values only and G through Z will copy the formulas.
Sub import() On Error Resume Next Dim wb As Workbook Dim c As Range Dim rngTo As Range
For Each c In Range("D1:D10").Cells Set wb = Workbooks.Open(Filename:=c.Value) With Workbooks("DigitalTicketMaster.xls"). Sheets("All") Set rngTo = .Range("A" & .Rows.Count).End(xlUp).Offset(1, 0) End With wb.Sheets("Combined").Range("A2:C100").Copy rngTo wb.Close ............................................. we have a change on our sheet, make it easy for our guys. Column A, is the date. Today 6/29.
They enter it once at the top, and it pastes for them automatically (a simple cell = $E$1)
But now, when I use the macro, it pastes over the formula that I don't want nor need, and have to call the second macro for. But then everything in that column shoes E1 on my new sheet, which is not the date... and each sheet changes dates, so I can't just have the date all the same.
What can I do in my original code to still make it loop, pull all my pages that I tell it to, but paste values only?
Would it be possible, in my loop, to highlight my cells, on that sheet... A2:C100, copy them, paste themselves right onto themselves, as values only, then copy over to my new sheet?
I have a macro that pastes formulas as values on specific pages (("CTY EME", "Int Center", " Total SW dist cost", "Int, pubs & oth", "Total". Is there a way to compress the macro ie with the sheet names?
In the sample worksheet, I need VB code to copy the formulas in column D, to paste them as values in the same cells (without removing autofilter by clicking on menu Data>Filter>Autofilter, then edit>copy>paste special>values).
in the sample worksheet, I need help with a VB code to copy the formulas in column D, to paste them as values in the same cells (without removing autofilter by clicking on menu Data>Filter>Autofilter, then edit>copy>paste special>values).
I've found a few macros that will automate changing cell references from absolute to relative and they work great. However, when I run the macros on formulas that have references to another worksheet or workbook, the macro will not work correctly.
I'm trying to automate creating certain keyword combinations I need, based off of the values I input into reference cells in columns A - E; the goal is to compile a list of keywords which I will then use to track my rankings in search engines.
I'm looking to only output 500 keywords, so some of the cells in columns A, B, C & E will not contain data (column D will always have a primary Geo-target listed). This results in some of the concatenate formulas I've created outputting partial data (i.e. if there is no data in cell A10, and cell D2 contains the word "Knoxville", then cell I10 will output the data, "Knoxville "). How can I setup conditioning formatting or a formula so that these auto-generated cells appear blank if one of the reference cells has no data within it?The reason why I need the above to work is because I want to setup a formula that automatically counts the # of keyword combinations created by the data entered into any of the reference cells. With the partial combinations being listed, it skews my data. Which leads me to my next question: what is the best formula for counting the # of cells containing a full keyword combination from any of the cells listed in columns G - O (minus the data in the header cells; i.e. G1, H1, etc...)?Lastly, is there a formula I could use that would then aggregate all of the full keyword combinations within the "Complete Keyword List" column (column P)?
I am running Excel 2007 on Windows Vista Business 32 bit. Recently I have noticed that if I enter a formula into an empty, unsused cell, it is recognized as a formula. If I modify that formula, it is then recognized as text and does not work as a formula. The only way I can get the cell to recognize a formula is to delete the cell and start over. This same scenario does not occur on previously stored workbooks. I have checked all of the flags that I know about, including the Options function.
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).
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.
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.
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?