Copy Range X Times Based On Cell Value

Jan 8, 2008

Is it possible to have the user inputing a value in cell $G$8 and have the range B11 to G11 to be copied x time depending the value of Cell $G$8 down. ie: Value is 5, it will be copied on 5 rows under B11 to G11??

View 3 Replies


ADVERTISEMENT

Copy-paste A Range 5 Times?

Jul 31, 2012

I have a range A3:E70 where A3:E69 have the same formatting and the text in A70:E70 is bold. I want to copy-paste the entire range a number of times with a for ... next-loop. Actually, it's kind of a template system. I make the template A3:E70 and uses it a number of times.

View 2 Replies View Related

Copy Range Multiple Times Across Sheets

Mar 31, 2014

I have the following data in one "Project_list" tab:

Project
AAAA
BBBB
CCCC
DDDD

I want to copy this data into another tab "Transpose" in this form:

AAAA
AAAA
AAAA
AAAA
BBBB
BBBB
BBBB
BBBB

[code].....

So basically copying 4 times every row... as simple as that The constraint: I have about 1500+ projects in the project list, but this list can change so i need a statement that copy values 4 times till source tab has empty values. I would like to have in the second column the following serie for each project.

AAAA Q12014
AAAA Q22014
AAAA Q32014
AAAA Q42014

Note- i want to do this in VB not though formulas as i am doing other derivations in macro.

View 4 Replies View Related

Copy Range X Times & Paste & Format

Oct 9, 2007

I have a range of cells that is 10 rows high. I want to copy and paste this range 11 times while identifying each of the 11 copies of the range, such as; 02,03,04...12.

Please see attachment for an example of what I am trying to do.

Does anyone have an idea of how this might be done in VB?

View 3 Replies View Related

Copy & Paste Specific Number Of Times Based On Value

Jul 22, 2007

I enter a part number in "D1". The number of components required for that part number is returned in "G1" based on a VLookup. I would like a macro that will copy and paste the part number I enter in "D1" in the first empty cell in column "D" and will paste it once for each component (G1) required. For example, if the number of components required is 4, and the first empty cell in column "D" is "D10", I would like to paste the part number in cells "D10", "D11", "D12", and "D13".

View 2 Replies View Related

Run A Loop For 1000 Times And Take Value - Copy / Paste In A Range

Sep 30, 2013

I have a rand () which provides me a different number upon calculate. I would like to run a loop for 1000 times and take the value and copy and paste in a range.

The below sorta works, but at times it stops or doesn't work at all. I have a loop for the counter and the for each to place the value into the cell and have it run over and over and placing the value in the next cell underneath. I have the counter at 10 so I dont get stuck in some endless loop before I know it works.

Code:

Sub montecarlos()
Dim MCs As Long
Dim c As Range
Dim lCount As Long
Dim lNum As Long
lCount = 0
lNum = 1
Worksheets("MonteCarlo").Activate

[code].....

View 6 Replies View Related

Copy Range To New Workbook Based On Cell Value

Dec 20, 2007

to add additional questions to this link it says that the thread is expired so here i have posted a new thread.

Copy Cells To New Workbook If Match Criteria what i need is to copy the cells in new workbook "as is" i mean copy only the values and not the formula.

View 5 Replies View Related

How To Copy Cell Range Based On Individual Cell

Mar 15, 2014

I have a spreadsheet (book1.xls) that has a column with 13 names down the side and 31 other rows (dates of the month)

Mike1 1 2 3 4 5 6 7 8 9
Mike2 1 2 3 4 5 6 7 8 9
Mike3 1 2 3 4 5 6 7 8 9
Mike4 1 2 3 4 5 6 7 8 9 etc

I have selected all 13 rows and 7 days and named them 'week1', and the next 7 days 'week2', the next 7 days 'week3' etc/What i want is to display the named range based on a single cell selection based on a cell value in a different sheet.

The basics of it should be "If cell C1 = 1 then show me 'week1' or if cell C1 = 2 then show me 'week2' etc.

View 4 Replies View Related

Copy And Paste A Range Based On A Cell Value That Is Not Static?

Aug 8, 2014

Task:A user has to copy and paste a range of cells, if any row in column B has "PM" as a value.

I have several macros/VBS scripts that copy and paste from one workbook to another, how do I create a macro that says whatever row "PM" is in copy range F:BC on that row

My issues is the fact the PM can be in any row in column B in different sheets. Example.xlsx

View 6 Replies View Related

Copy Rows To Sheet Based On Cell Value In Range

Aug 16, 2007

a macro button on my excel sheet that should do the following.

i have a range (Ex: E3:E46) which is being continuously filled, i need to transfer the information to another sheet depending on column "E", (Ex: if "E3" = "A" paste row to sheet2 if = "B" paste row to sheet3) and so on each row could have another string in column "E".

after the paste is done it should clear the range making place for new entries, that should also be copied finding the next empty cell (it shouldn't delete the old entries)

View 9 Replies View Related

Copy And Paste Range Of Cells Based On Number Of Cell Values In Column A

Mar 17, 2014

Please see attached sample worksheet. Column A will be generated by the user manually.

I'm looking for a way in VBA to have A1:D20 in Sheet2 copied and pasted in the "Bank Reconciliation" Sheet based on how many "Markets" there are in Column A. Then, once that's complete to have A22:D30 (the smaller box in Sheet2) copied and pasted directly below those results.

I have what the macro would hopefully generate to the right in "Bank Reconciliation" (B6:E54) as an example. So if there's a market in A1, copy and paste the box to B6. If there's a market in A2, copy and paste the box directly below the first (B26) etc. etc. until it's done, then paste the smaller box directly below whatever the macro generates.

Book2.xlsx‎

View 3 Replies View Related

VBA - Copy / Paste Cell 144 Times In Column

Mar 14, 2014

I have the price of S&P 500 in the L2 until L145 column.

And I would like to past each cell (L2, then L3, then L4....until L145) 220 times in column F.

As follow

L :
1780
1715
1680
.........(144 value)

TO column F

F:
1780
1780
1780
.........(220times)
1715
1715
1715
.........(220times)
1680
1680
1680
........(220times)

View 6 Replies View Related

Sum Based Upon Cell Color - Multiple Times

Oct 7, 2008

I have a workbook with a tab called "parts list" where there are thousands of parts with prices. I need to sum all of the parts based upon their location within the list. The list is divided with the following headers - Yellow (Assemblies), Gray (Sub-Assemblies) there can be many under a yellow header, and Green (Components) there can be many under a Gray header.

I have been summing the areas manually, and I am hoping for a more automated way of creating the totals by running a macro.

I need to sum (Column K) from Yellow+1 to Yellow-1 and deposit the sum in the starting Yellow row - Column L. This needs to be repeated for as many Yellow Headers as there are in the list. I then need to repeat the process for Gray Headers - Col K, Gray+1 to Gray-1, and put total in starting Gray header, Column L. Once again, there can be many Gray Headers under a Yellow header, and this needs t be repeated throughout the list. I then need to repeat this for the Green Headers - same as above Gray. I am hoping that this can be done by color, but if it's easier, I can sort the list by color and in column M, add an "A" to all Yellow Headers, "S" to all Gray Headers, "C" to all Green Headers, and "E" to represent the end of the component list -

View 10 Replies View Related

Copying Columns For N Times Based On Value In A Cell On Same Sheet

Oct 8, 2013

With reference to attached file. I want to copy column D&E for 'n' number of times of value based on B1. If value in cell B2 is 0 then hide cell D&E and if there is any other value, excel to copy E&F to next column (leaving one column blank after each paste).

A
B
C
D
E

2

Product A
Price

VTA-2001
999

VTAA-2001
1299

XMV-1001
1000

View 5 Replies View Related

Copy / Filter Data Based On Data In Column Occuring X Times

Mar 7, 2008

I have a excel worksheet with the following columns: First name, Last Name, Email address, domain of email, product type, date registered. The list consists of about 50,000 entries. I want to sort the list by the domain of email(which I am able to do already) Once this is done, I want to find all instances of where a domain appears at least 10 times on the list(such as webmessenger.com appears 40 times, so I want to get that data).

For those instances where the domain appears at least 10 times, I want to pull those rows out of the intial list and put them in a new list(the new list will be sorted by domain and will only have people who have a domain which appears at least 10 times). To make this a bit more clear, The initial list I have is a list of people who registered to use the software my employer makes. We are trying to locate companies which may have many people using our consumer version of the software. When there is a large amount of people in the same organization using our software, it would benefit them to upgrade to the enterprise version due to enhanced managment features. By running this filter, I can see which companies have at least 10 users registered to use our software. Of course I will remove any Gmail/yahoo mail/msn/hotmail... pretty much any public email domains and just leave the ones that are obviously corporate emails.

So far, I think it probably has to be done with a pivot table... I was able to get a table that tells me how many instances occur from each domain, but I cannot get it to display the actual data(it just says IE. company.com 200, yahoo 120, etc... I need it to show me the 200 rows of company.com emails and extract them to a new sheet so that I can then follow up with company.com and see if they are interested in the corporate version.)

View 2 Replies View Related

Make Cell Result Copy Itself Into Subsequent Cells X Number Of Times?

May 9, 2013

Say I have (cell A1) 10 salespeople and they each sell a (A2) $100/month membership, so I have (A3) $1,000 monthly revenue.

(A4) is an assumption about how many months the average person will stay a member.

So if A4 = 6, (6 month membership assumption) how would I get Excel to output $1,000 (the result from A3) into cells B3 through B8

but then for instance if A4 = 3 (3 month membership assumption) it would only output the the $1,000 result from A3 into cells B3 through B5

So like A1 through A4 of...

10
$100
$1,000
6

would output $1,000 into B3 through B8

but

10
$100
$1,000
3

would output $1,000 only to B3 to B5

View 1 Replies View Related

Excel 2010 :: Insert Row Data N Times Based On Cell Value

May 1, 2012

I have a sheet that contains the following columns:
Invoice, Document #, Date, PO #, Part #, Part Description, Quantity, Net Amount

Based on the quantity in the row I need to copy the row, and insert it n-1 times. So if the quantity is 5, I need to copy and insert the data below the original row 4 times for a total of 5 rows of data.

I plan on firing the macro with a button as the data will change month to month.

Using Windows 7 and Excel 2010

View 2 Replies View Related

VBA - Copy Range With Multiple Same Values Based On Other Cell Values

Aug 31, 2012

I want to build a database where the user can select a specific time period. I have a static file with the time periods and the related values. For instance I have in column A1:A15 the time periods from January 2011 to Dezember 2011, but I have some dates multiple times as there are more values attached to it. For instance I have in the first 4 rows January 2011...what I want is when someone puts in the value January 2011 in cell B1 and Dezember 2011 in cell B2 that the whole static file gets copied to another location (including the multiple dates) displaying the chosen time period. Similarly if someone puts in the value March 2011 to November 2011, I want only those values to be copied.

View 4 Replies View Related

Excel 2003 :: Count How Many Times A Word Is In A Range / Word Can Be In Cell More Than Once

Feb 16, 2012

I need to count how many times the word Test is in the range B4:H9 with

Range N2 = Test the formula below works if Test is only in the cell once.

=COUNTIF($B$4:$H$9,"*" & N2 & "*")

But I have data in cells like below, this is all in one cell, so how would I have it count all the times test is in the range when some cells have test 2 or more times in a single cell?

5
Test
8am-2pm
Test
5pm-10pm

View 5 Replies View Related

Copy Range Based On Date

Feb 3, 2014

I have a bunch of open files with dates in cell A3. I want to copy the range starting in A7 (the same range and size in all the open files) and paste it into my vbafile based on matching the date (in row 11). I have a spreadsheet attach with an example of what the code would do for Jan 1.

View 5 Replies View Related

Copy Every Nth Range Based On Criteria

Feb 15, 2010

I am copying from cell A2 to C2, then A8 to C8, etc. if the cell in column "A" contains the text "Item" until the end of data in column A. Here is what I am attempting:

Sub MoveItem()
sText = "Item"
sText = LCase(sText)
iMax = Cells.SpecialCells(xlCellTypeLastCell).Row
For i1 = iMax To 1 Step -1
If InStr(1, LCase(Cells(i1, 1)), sText) <> 0 Then
Cells(i1, 1).Copy Destination:=Cells(i1, 3)
End If
Next i1
End Sub

The problem is the destination location. If I define it as a Range eg: Cells(i1, 1).Copy Destination:=Range("C2") The macro works, but does not iterate the destination cell.

View 3 Replies View Related

Copy Range Based On Certain Conditions

Sep 5, 2006

I have this macro to copy a range to another worksheet:

Sub transpose_UPCID() ' Hace el copy y paste transposed en BAUCS de los numeros de UPC"s y
' las cajas ATR
Dim rng1 As Range
Dim rng2 As Range
Set rng1 = Sheets("Sales-Inventory").Range("UPC", Range("MK_ID").End(xlDown))
Set rng2 = Sheets("Sales-Inventory").Range("Figure", Range("Figure").End(xlDown))
rng1.Copy
Sheets("BAUCS").Range("C11").PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
rng2.Copy
Sheets("BAUCS").Range("C37").PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
Application.CutCopyMode = True
End Sub

The only problem is that this code copies all the items and I need this code to look into Column A in the Sales-Inventory worksheet. There I have a data validation with a total of six options. I also have six differents worksheets where I need to copy the values based on that data validation. To give you and example, all items containing XX in column A copy to XX worksheet. Something like that.

View 9 Replies View Related

Count Hours Between 2 Times Based On Hours In Another Cell

Jun 11, 2008

A1 is 10 (10 hrs worked) , A2 is 10:30am (in time), A3 is 9:00pm (out time), A4 needs to be the total hours and minutes between A2 and A3 based on the hours listed in A-1. What i need is a formula that will calculate the hours and minutes between the 2 times based on hours entered in A1 but that will also compensate for a manadatory 30 minute lunch that needs to be deducted from the total hours if hrs listed in A1 are more than 6.

example: worked 10HRS, 10:30am to 9:00pm, Total hrs is 10hrs 30min, which should be just 10 since the lunch is a none work time and must be subtracted.

If a person worked more than 6hrs, they must take a lunch. if they worked less, than 6 then they don't have to. I need a calcuation to recognize the greater than, less than factor into the equasion also.

View 9 Replies View Related

Copy Range Based On Criteria That Changes Constantly

May 7, 2009

I am trying to copy a range of cells, based on a set of criteria that changes constantly.

In Column A, I have numerical values that are present every 10th cell. In columns B through D, I have various text data that corresponds to the number in Column A. So for example, in A50, I have the number 46975. In the range B50-D59, I have text data that goes with the number in A50.

Each day I run a few calculations and based on the number I get, I want to find the exact match in column A, then copy all the data in columns B through D that are related. So if my calculations result in 46975, I want to automatically copy over to another worksheet the range B50-D59.

View 4 Replies View Related

Copy Cells To Different Sheet Based On Range

Mar 22, 2012

I need to make a VBA Macro (Assigned to a button) that will copy the information under the "Cut Length Worksheet" and paste it into the appropriate columns in our "Bill Of Materials Template." Any way to copy the cells, across different rows, into the proper cells.

I have several different Macros and Workbooks made up now, but I am lost here.

I also need the Cut Lengths to add certain info to the cell when it is copied:

8 | 7-15/16 ---> 8'- | 7-15/16"

Here is a Link to the Excel page.

View 3 Replies View Related

VBA Select Range To Copy Based On Two Variables

Jan 13, 2014

I have a Macro that already works great but now I need to look for another variable to sort it down even further. I think it can be done by setting up a "Case" but still not sure how to do that. It already looks through the range to find all the rows that return a value of "True". Now I need it sort those results so it only returns what has a specified value in Column "AJ". I am looking to do several choices (Listed Here). So the end result will be all the items that return "TRUE" In Column "AI" and are Items that return one of these values per Case "Starters, Appetizers, Soup, Salad, Entree, Dessert, Special" with then copy over in the exact format that is listed in the code below.

For example All the items that are selected with "TRUE" can be narrowed down to all of those that are "Salad" as well - Then copied over in the exact format that is listed in the code below.

What I am doing is breaking out all the different course of food and putting a Header in-between each (That is already built and working) - So I can select all the food from a master list and then put it in order on the "Catering BEO" Sheet with Headers in between

Code:
Sub BEOA4()
Application.ScreenUpdating = False
Dim wsSource As Worksheet
Dim wsDest As Worksheet
Dim FoundX As Range
Dim FirstFound As String
Dim lastrow As Long

[code]....

View 3 Replies View Related

Copy Rows In Range Based On Criteria

Jul 14, 2006

which I have modified from one that I use before for sheets 1 & 3 (instead of 4&5)

But it isn't working! I have defined a dynamic range in sheet 4, which is the range I want to search (its named "search") should i be using this range in the formula somewhere?


Private Sub CommandButton1_Click()

Dim rngFind As Range
Dim strFirstAddress As String

With Sheet4.UsedRange
Set rngFind = . Find(ComboBox1.Text, LookIn:=xlValues)
If Not rngFind Is Nothing Then
strFirstAddress = rngFind.Address
Do
rngFind.EntireRow.Copy Sheet5.Range("A" & Sheet5.Rows.Count).End(xlUp).Offset(0, 0)
Set rngFind = .FindNext(rngFind)
Loop While Not rngFind Is Nothing And rngFind.Address <> strFirstAddress
End If ..................

View 9 Replies View Related

Copy Range Based On Value To Closed Workbook

Jul 28, 2007

I would like to be able to have a user execute a macro by clicking a command button that would copy some named ranges (Name1,Name2,Name3) BUT ONLY the rows/cells that have "True" in column A. The destination for the pasted data is a closed Workbook named Data – Sheet1 located on a network drive (\NetworkTemplate)

Example:
One named range are cells D10:D50, a second named range are cells F10:F50, and a third is G10:G50. – But ONLY rows 11, 13,14 have True in column A, so I only want to copy the 9 cells not the entire row from those select ranges and open a closed workbook and paste the values only starting with cell B10.

I can not find anything that looks for a value in one column and only copies select cells to another workbook.

View 4 Replies View Related

Copy Or Clear A Range Based On Checkbox

Jan 30, 2008

I am good at excel but an infant with VBA. I have inserted a checkbox onto my worksheet. I want it, when checked, to select a row of data ("k5:k16") from Sheet 1 and copy it to ("a1:a12") in Sheet 5. When the checkbox is unselected, I want the ("a1:a12") to be cleared. I've tried several different ways to copy and continue to run into errors. I know there is a simple solution, but it's beyond me.

View 2 Replies View Related

Find Matched Value In A Range For Named Cell Then Copy Range Cells Below

Aug 6, 2013

I need method, using a button, that looks at a cell--say EO2, for example--, looks back on a master worksheet at a specified row and range for a match, then looks at the information from a specified range below the matching cell (The information in this column will either be blank or have an "X" in the cell), and then those rows that do not have an "X" will be hidden in the corresponding rows in the working worksheet. Therefore, if at any time the value in "EO2" ever changes, then it will automatically find a new match and repopulate and hide information as before. About 130 columns will have its own button so that a "query" can be made that depends on the information in a particular cell in that column.

The master worksheet now has matrix of 287 rows and 58 columns. Each row is for an operating procedure and each column shows a job code. An "X" in a coordinate cell for a column/row shows whether that job code is responsible for knowing that operating procedure. So, on the working sheet, an employee's primary job code is given underneath his or her name. When the button is pushed, all the operating procedures not required for a given person will be hidden and only the required ones will remain visible--grouped, if you will. Qualification dates will be easier to see now that the information is consolidated. Whenever someone transfers to a new position, a new code will be inputed on the working sheet. When the button is pushed, a new grouping will result. Any operating instructions that overlap will still have qualification dates, so that information will not need to be transcribed.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved