Application.inputbox: Range To Copy And Paste The Range's Link And Format To A Different Sheet
Oct 7, 2009
Need a code using application.inputbox to get a range, then use that range to copy and paste the range's link and format to a different sheet? The specifics don't matter, I just can't figure out the syntax. Here is what I have currently:
I have this code that copy/pastes a range from another sheet for every nth row. In the code I have pasted cells I need to merge the cell with the cell to the right and format it. I thought I was doing ok but the code keeps returning an error (run-time 1004) and I don't know the solution, it is beyond my level of VBA.
Code: Sub test() Dim ws1 As Worksheet Dim ws2 As Worksheet Dim lngRowCounter As Long Dim newRowCounter As Long
The code in red is the problem and I have commented it out so it can run, but I need it to merge and format. I don't know how to address range/cells in column B and C together (they are the two cells I wish to merge and format).
I have a sheet named "Fittings Summary" with an export button. I need some code that will copy range A1:G38 of the fitting summary sheet then open a dialogue box asking for the following "Please Enter Tag No" once a tag number is entered I would like a new sheet to be created in the same workbook named with the tag no entered previously then the copied cells pasted into it. I would like to keep the formatting of the cells but not the formulas within.
Essentially I need to copy the first 8 cells in a row in one sheet (for example: A3:I3) when the word "Actuals" is entered into A3 from a drop down list. Then the copied data needs to be pasted to a another existing worksheet in the same workbook in the next available row. The data includes mostly values, but there is a formula in column H that creates a hyperlink out of the content in column G, friendly name in column I.
I am not stuck on the idea of having "Actuals" entered in column A as the trigger or change event and there will be times when a new copy/paste of the same data will need to be done more than once at a later date.
For further information, column B contains a serial number/productID number.
To initialize some cells/ranges, I am copying a given range and pasting it to another given range using the. Copy and .PaseSpecial methods. However, it would seem that both methods actually select the range(s) for the operations, i.e. the given ranges(s) are activated/selected thus changing the focus on the spreadsheet. I would like to perform both operations without actually selecting the given ranges.
I have the following code that let's the user choose and " import" data to an existing sheet. It works well up until now. The problem is that the three ranges that I am trying to copy the data from on workbook to another has changed size. In previous version of my workbooks the range was two columns by 10 rows. Now, it is 1 column by 10 rows. So, when I run this macro it doesn't work because the two ranges are different. Is there any way to: 1) Only copy over one of the rows of a range thus making the macro run?
2) Do not run that part of the macro if there is an error?
Thanks so much for reading this long-winded description but the error is a big problem
Hi. Does anyone know a formula to copy a selected range of cells on sheet one to a range on sheet three when a check box in checked. Ex. copy range a4:j4 on sheet one into a4:j4 on sheet three once the check box for on sheet one is checked?
Basically I have three sheets. MAIN, Sheet 1 and Sheet 2
Sheet 1 and 2 are in the same format
A3 down is a list of country names and then B3:I71 contains the data im interested in.
I've been trying to create a function that looks at B3:i71 to see if any cell in that range contains a value greater then $0.00. If it does then the row that contains the cell with a value greater then $0.00 (between col A to K) should be copied to sheet MAIN from cells B3 down. This should ultimatley produce a list of data for any row containing a value greater then $0.00. This process should then be repeated on Sheet 2 and should join the list below sheet 1.
I'm developing a loan processing system for members of a club. When an applicant asks for a loan, the club will calculate 10 % of that interest and the applicant will have to pay it back in 5 successive fortnightly instalments. If he asks for a loan in the first fortnight (1), for example, he will have to start paying instalments in fortnights 2,3,4,5,6 to pay it all back.
The system currently has 4 worksheets. The first sheet is a the loan application form. The cells outlined in thicker border, are the cells in which details must be input. Once it is input, the data will be automatically placed in the Processing worksheet using IF and VLookup functions (See spreadsheet attached), which is used as a basis for the loan schedule Worksheet. What I need is a macro that will copy the range filled in the Processing worksheet, and copy it to the exact same location in the Loan schedule worksheet (The cells with the same fortnight columns and the same member name. This is how the loans are to be filed.
can somone tell me why the attached code will not work it works for the first range only but when others added it fails also how do you clear outline of copied cells, i used range ("D9").Select but no good.
[A20].End(xlUp) takes care of the 19th row .. how can I adjust the range to start at row 8 ?
Sub CopyBoldCells() Application.ScreenUpdating = False Dim rng As Range Range("A1:A10").Select For Each rng In Selection If rng.Font.Bold = True Then Rows("" & rng.Row & ":" & rng.Row & "").Copy Sheets("Sheet2").Select [A20].End(xlUp).Offset(1, 0).Select ActiveSheet.Paste Sheets("Sheet1").Select End If Next rng Application.ScreenUpdating = True End Sub
i have a code that searches column B for data entered in textbox, when the data is located it highlights active row yellow, i then added the following code so that when i changed from highlighted row the row changed back to no fill. it worked but now i can not cut and paste within the sheet? can this be fixed.