Duplicating A Number According To Value?
Aug 12, 2014Is there a simple way to duplicate a number according to a given value? For example, i want the input to be 8 and the number is 1 so the output would be 11111111.
View 3 RepliesIs there a simple way to duplicate a number according to a given value? For example, i want the input to be 8 and the number is 1 so the output would be 11111111.
View 3 RepliesI've been given an excel file with 75 addresses (1 address entry per row) and I have to make 150 copies of each address while also numbering column D for each row 1-150.
So in the end it would go from: (sorry for the periods.. extra spacing didn't work!)
A........B................C.......D
AAA...123 Street...City...<blank>
BBB...456 Street...City...<blank>
CCC...789 Street...City...<blank>
To:
A........B................C.......D
AAA...123 Street...City...1
AAA...123 Street...City...2
AAA...123 Street...City...3~
AAA...123 Street...City...150
BBB...456 Street...City...1
BBB...456 Street...City...2
BBB...456 Street...City...3~
BBB...456 Street...City...150
CCC...789 Street...City...1
CCC...789 Street...City...2
CCC...789 Street...City...3~
CCC...789 Street...City...150
I don't mean to be lazy and just ask for a macro code, but I'm a complete excel novice and just looking for a quick and easy fix rather than copy/pasting these entries manually.. edit: this file has a deadline for it, which is the reason for the quick fix not to just get out of learning how to do it
I've tried to make a macro consisting of inserting a row, copying a row then pasting it, but that only worked for the first row that I'm duplicating.
I am trying to make an inventory cover page - that shows data of separate products on different sheets with the following;
Product
Date
Previous Total
Amount Taken
New Total
and occasionally there is a Re-issue of stock to the previous total.
This is at the moment an historical record as anyone can see the usage across the dates for any particular product by looking at the sheet. Each time there is a change to the inventory it is recorded on a new row. But what I am trying to do is to copy the last row of data from each sheet to the cover page to show an overall inventory.
The part where I get stuck is making the selection of the last entered row of data [from each sheet] automatically updating the coverpage, when each sheet will get new data added frequently.
I thought about somehow making a duplicate of the last row and locking it in place and linking that to the coverpage - but I still do not have a clue on how to get it to automatically select the last row of the data.
I have attached a spreadsheet here showing when people have had squash coaching.
What I would like to do is have a summary section at the bottom showing how many sessions each person has had throughout the month, at which club.
So where a club code such as the "C" "N" or "NO" is used I would like to insert the person's name in the summary section at the bottom.
If the same person's name occurs again I would like to simply (that's the hard bit for me!) use one cell to continue to count his number of sessions - rather than duplicating his name over and over in a list, as would be done by using COUNTIF.
I'm well lost on how this might be done but am sure that it must be possible?
I am in need of duplicating a current workbook for others use such that when I update information in the original all those who have a copy of the duplicate will get the updates I have made. I have searched all over for linking workbooks together and I am familiar with linking cells and other small bits of information from other workbooks but in this case I want a duplicate workbook that is updateable from my source workbook.
View 5 Replies View RelatedI'm creating a KPI spreadsheet which utilizes named ranges to allow for Dynamic charting. I've created the first data input sheet for one of the 10 areas being KPIed. The sheet has 60 named ranges in it.
The goal is to duplicate the existing sheet (Area 1A) 10 times and adjust the named ranges and formulas within the named ranges according to the sheet names.
Is there a way to accomplish this without having to manually recreate or edit every named range for each new sheet?
I am attempting to duplicate data from the first cell in each row in Sheet1 to the first cell in 6 rows in Sheet2.
I want to do this for each row in Sheet1. For example, I want to take cell A1 from Sheet1 and copy what was in that into Sheet2 into cells A1-A6. Then I want to take A2 from Sheet1 and copy what was in that into Sheet2 into cells A7-A12.
Is there an easier way to go about doing this? I have too many rows in Sheet1 to do this by hand.
Edit: I know the formula for getting a value from Sheet1 and put into Sheet2 cells A1-A6: =(Sheet1!A1)
I'm trying to automate some documents we use on a regular basis so that we don't have to re-enter the same information over and over again. Basically I can get some cells to work and some will not. My first sheet is a contract. So I want Customer and Contractor info to show up on the rest of the sheets. I'm assuming something is messed up in the formatting of the cells but I can't figure out what.
So on my Job Book Cover Sheet I first want the GC's name and the code =Contract!G8 works perfectly. In the cell just under this one I want the Customers Name, but =Contract!C8:D8 (the cells on the contract with the Customers Name) returns #VALUE!
That said, the code =Contract!C8:D8 on my project detailer sheet returns the customer name like I want it to.
What exactly do I want to count?
I want to count how many unique serial numbers there are for a particular production error?
For example
Column A = Serial Number (which is too many are same) so won't the duplicated.
Column B = Error Message "Error"
Which formula can count's how many serial with error was encountered on the summary sheets.
The following code was supplied by Bill, but I want to do the same thing in B10:B164, where "x" is entered in B10 and the time stamp is entered in C10 & D10.
I tried copying the same script but had an Compile error message which said Ambiguous name detected: Worksheet_Change. The name of the sheet is Sheet 1 (Main)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("M10:M164 ")) Is Nothing Then 'change your range on this line"
If Target.Value = "x" Then
Target.Offset(0, 1).Value = Now
Else
Target.Offset(0, 1).Value = ""
End If
End If
End Sub
I have a worksheet (Morning Reports) that has a running macro on what I need is how do I get this same code to work on a different sheet titled (Afternoon Reports) This afternoon report will be a scaled down version with slightly different range:
How do I modify this code to do the same thing just on a different sheet
[Code] ....
Protection password is "Financial3" and sheet and VBA
Attached File : New Morning Report - Master_Copy-NO DELETE.xlsm
I have two sheets, they basically contain shifts. They are laid out identically the only thing that changes is the date along row 1. In order not to have to recreate the workers from sheet1 onto sheet2 I use the following
View 2 Replies View RelatedI m writing a macro that will match duplicating cells in an excel spreadsheet. Here is an example.
BEFORE MACRO
id1 | example 1 | example 2 |
id2 | example 3 | example 4 |
id1 | example 5 | example 6 |
id2 | example 7 | |
AFTER MACRO
id1 | example 1 | example 2 | example 5 | example 6 |
id2 | example 3 | example 4 | example 7 | |
How to open a fresh workbook and have information automatically being pasted in, based on a checkbox trigger. I don't know if I have explained well or not but essentially it is this:
W5 is the checkbox with a tick and a cross. When the cell is ticked I want to specicy cells on this record to be brought over to another tab.
Im replicating rows which have multiple items in Column1. Im aware that the ID Column has duplicates..my source data is like that for now so I wont complicate it just yet.
Once ive got this working I can proceed to the rest of the tasks
This is my Excel dilemma: creating roundrobin pairs.
For a given list of numbers, I need to generate pairs where each number is paired with all the other numbers without creating a duplicate pair.
For example: 1,3,4,6... (dynamic)
Pairs: 1-3, 1-4, 1-6, 3-4, 3-6, 4-6
Results should be generated in two columns. Column A would be ID1, Column B would be ID2 (the combination of both would be the pair created)
ID1ID2131416343646
I have basic ideas for a macro but the loop within a loop and the OFFSET for the next row is something I really can't put together.
As a simple example, I have three columns (A,B,C). In both Column A and B they have single word text in them, but in Column C it is a paragraph of words that I format the cells to 'fill' so that it is all tight and concise when viewing the worksheet.
Afer I have saved the document and have closed it when I reopen the document. Cells from column C have randomly duplicated themselfs throughout the entire worksheet,but only onto columns A,B,C (where there is pre-existing text). As the random cells get duplicated it overrights the original text (results) as it does it, so once I open up a document and see this it is to late. this is a continual problem that I cant find a resolution for.
(Excel 2007), I have a template that I need duplicated for every reference. My Worksheet lists all the references and the macro use to duplicate a worksheet for every reference in the worksheet. The problem is when duplicating now, it duplicates the name of the template. For example, when the macro is ran sheet1= Template(1), sheet2= Template(2) ect.
Here's the code- I think it has something to do with the named ranges
Code:
Sub Macro1()
For i = 1 To Application.WorksheetFunction.CountA(Worksheets("Worksheet").Range("A:A"))
Sheets("Template").Select
Sheets("Template").Copy After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = Worksheets("Worksheet").Cells(i, 1).Text
Next i
End Sub
I wanted to see if it were possible to combine multiple worksheets into one new worksheet, but without duplicating columns with the same heading, enabling the data to fall into the correct column if it's shared in multiple worksheets, and adding columns if their unique. Furthermore, if there are a few "leading" columns, i.e. ones that are shared in every sheet and never move from where they are, to include those as the leading columns in the new sheet. I'm unable to post an attachment, but I'll try to paint a picture. This is on a much smaller scale than intended, but I want to combine Sheet 1 and Sheet 2 to form Sheet 3 (which I've manually copied to look how I would want it to look if the formula/code works properly). Columns A, B, and C are the "leading" columns I was referencing, whereas any of the following columns may or may not be shared in the various worksheets, but should still be included and combined if they're the same. There also might be a different number of columns depending on the sheet. I consider myself somewhat of an intermediate user, and I am familiar with using VBA codes for formulas should that be the proper remedy.
View 2 Replies View RelatedI am currently trying to add some functionality to an Excel workbook and I have a combo box that I am unable to get the values to populate. On the same worksheet I have a command button. Here is the code I am using to attempt to populate the combo box:
Private Sub cmdSendSave_Click()
Call SendSave
End Sub
Private Sub bxLocation_Change()
With bxLocation
.AddItem "Mt. Hope"
.AddItem "Summersville"
.AddItem "Huntington"
.AddItem "Pulaski"
.AddItem "Coastal Bend"
.AddItem "Odessa"
.AddItem "Wheeling"
.AddItem "Hollywood"
End With
End Sub
I have 2 columns,
column A has a series of 8 digit numbers (some will match some will not) sorting in A-z order from lowest to highest value.
Column B is blank at the moment.
What I want
In column B i need to add numbers starting at 1 and moving down in sequence.
If more than one rows have the same number in column A they get the same numbe rin Column B
It's really a pain or have to hand type in the numbers and I can't figure out a easy way to do this.
Attached example.
Tab 1 = Origanl Data
Tab 2 = results i'm lookin for.
I tried to search the forum for my unique problem but had no luck. As you will see attached, I have a series of excel buttons I need to duplicate and have target a different set of cells. I am hoping there is a way to avoid manually doing this.
The goal of the document is to push the button when both colours in the row and column interact (research on birds). There are two additional behaviours with an exact same set of buttons but they need to target "Body Rush" and "Food Displacement" tables underneath. I need all the buttons on one page since multiple behaviours happen simultaneously that need to be recorded.
I have something like 100+ modules in VBA I have created, I am hoping there is an easier way to do this so I don't have to create another ~200 modules in order to get the last two behaviours setup.
I am hoping there is either an easier button system or way to make buttons adjust somehow.
I am not the most advanced VBA user
I am trying to copy two cells from one worksheet to another in the same work book based on the value in Column B of one of the sheets. This is just a building block to a larger script I am going to create.
Below is my attempt but I keep getting an error at Range(Cells(x, 3)).Select.
It is for a calibration spreadsheet that I run that keeps track of when items are due to be calibrated.
It works at the moment and has populated my outlook with calendar entry and reminder 2 weeks before they are due - which is perfect.
The problem is when I update one of the calibration dates I will want to re-run the macro to create a new appointment - but this will duplicate all the appointments that already exist! very annoying since there are over 200 items.
Sub outlook_appointment()
Dim olApp As Outlook.Application
Dim olAppItem As Outlook.AppointmentItem
[Code]...
I have 25 sheets in the workbook and a combobox on the main page, The combobox references a range of 1-25 that represents the 25 hidden pages. right now i can get the sheets to unhide one at a time based on the selection e.g. combobox option 1 will unhide sheet 1 but the sheet are representing sites in a design so i need to have the option to select multiple sites in the combobox option so for example if i select 5 then sheets 1-5 should unhide. I hope I've explained that clearly.
The other question or option would be to just duplicate sheet 1 based on the combobox selection e.g. selection 5 duplicates sheet 1 5 times.
I have this set of number..
987654.
What im trying to do is this..I read this number and check for the first number with the 2nd number. If its greater then i will swap it. Im trying to do this so that my number can be rearranged as 456789.
I need a formula that will calucalte the monthly total based on the following conditions:
Col A = Yearly Cost
Col B = The number of the month when the costs are starting (1=Jan etc)
Col C = The duration or the number of months for which the costs are to spread
Col D is Year 2013 with the months across columns D-O. Row 1 above those columns shows the month's corresponding number.
Right now I have =IF($B3<=D$1,$A3/$C3,0) however if my start month is 1 and my duration is 5, I need the costs to stop after May. I've attached a sample file. Calculate based on start month and duration.xlsx
I have an excel database where I register cases. I have in it a button that creates a folder with and ID nr that is in column A (I create new ID nr in the next row, when I press the button it will create a folder with that ID nr and inserts a blank word document in it). We have a template that we copy to the folder (depending what type of case). The idea would be that once the template is filled in and ready to print, It would take the values from the ID nr and a reference number a few cells to the right. Is it possible to tell excel to open the word document in the folder and create a PDF version with the ID nr and reference number. (there are only 2 templates, so the macro would have to look for one of the two in the folder) The names of the templates are: "Standard" and "Other". I guess the best way to start maybe this would be that I select the cell with the ID nr and then press a macro button to have this done. One thing that needs to be done, is to put a copy in the same folder and another in a second folder called "Binder" in my documents folder.
View 1 Replies View RelatedI have a problem that when I try to convert text to number and format the number without 2 decimal places as seen on the link I have given below, Instead of 1607.947, I get 1607947. I have Excel 2010 loaded. The details are in below picture.
[URL]
Excel 2007
ABCDE12145101843222121028543291410388563015104796731501058178325210
685894953107839104354108841011445510985111349661101215516710013135668
981417576999151858708916195971801720607291182161738219236274902024637
59121276476872228657786232425Sheet1