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
ADVERTISEMENT
Nov 10, 2013
I am on office 2010
I am new to VBA programming so i might be making a obvious mistake. I am trying to create a macro that will insert rows depending on a cell value. I also need this to be executed from a command button rather then to occur immediately after the cell value is entered. So as a example
Lets say
Cell A2 has a value 20
Cell A3 has a value 3
Cell A4 has a value 5
when this data is entered and then a Command button poressed there should be
20 rows beneath cell A2
3 rows beneath cell A3
5 rows beneath cell A4
View 9 Replies
View Related
Jan 17, 2013
I have two sheets with data. I wont excel to look for a value in colum A in sheet 2 the value to look for is defined in colum a in shet 1. If value is found it should insert in sheet one the value that is in the cell next to the found value. The data is not sorted. I have attempted and failed with using different functions.
View 1 Replies
View Related
Mar 23, 2012
I have a master data sheet with four columns, A, B, C and D
Column A has the primary data and B,C,D has dependent data values;
So when I insert a new cell in Column A with cells Shift Down, I want mandatorily new cells to be inserted in the same row in col B, C and D as well so that data integrity is maintained;
View 2 Replies
View Related
Apr 16, 2013
I am using Excel 2010. I am a novice user.
I have a lot of data to filter / sort. I want to initially to create a filter for a column of data - which has the format similar to hierarchical paths to files. The data is a mix of text/numbers. e.g.
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_254__5_0/d
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_253__5_0/d
pathA/path_123/path_456/data_out_reg_17_0/d
pathA/path_123/path_456/data_out_reg_0_0/d
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_255__5_0/d
[Code] .........
Doing an alphabetical sort of this date would return the following order. As you can see while each strings in unique - there are many instances where they are simialr - if you ignore the unique numeric values at the end of the string.
pathA/path_123/path_456/data_out_reg_0_0/d
pathA/path_123/path_456/data_out_reg_17_0/d
pathA/path_123/path_456/data_out_reg_4_0/d
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_230__6_0/d
[Code] ......
So what I want to do is to create a filter for the strings - but ignoring the numeric bits at the end i.e.
reg_[0-9]+_+[0-9]+/d
The strings are obviiously of varying length and the number of hierarchical paths is different, so I can't split string on "/".
Similarly folder paths names can contain "_" so can't split string on this either.
As I don't know how many "/" or "-" instances there will be in the string I don't believe I can use the find function. Also as the amount of number will be different i don't think I can use =right(a1,X) either.
I may be able to search for the pattern above - as this is probabay unique - so maybe it's something like the following pseudo code:
Function GetString(txt As String) As String
With CreateObject("VBScript.RegExp")
.Pattern = "reg_d+(_)+d+//d"
GetString = .execute(txt)(0)
End With
End Function
If I do require VBA code - how do I then use this for creating a column filter? Or will I have to extract the filtered data first from the column (and its associated row data) into another worksheet to use?
Once I have the filter in place I want to create tables using the filtered data - so for example each column value above has a lot of associated data values in each row e.g
26 pathA/path_123/path_456/data_out_reg_0_0/d
32 pathA/path_123/path_456/data_out_reg_17_0/d
8 pathA/path_123/path_456/data_out_reg_4_0/d
So my table would show the name "data_out_reg" and the range of values 8-32
View 1 Replies
View Related
Jan 30, 2014
I have an Excel 2010 spreadsheet consisting of many worksheets (20 or so). Each of these worksheets contain detail level data regarding different projects. One of the columns in these worksheets is the 'Status' column (column F). There is conditional formatting on this column where if the text is 'G' then change background to a green color, 'Y'=yellow, 'R'=Red and 'U'=Grey.
The first worksheet is a summary sheet that I would like to pull information from each of the detail worksheet's columns B, D, E, G and H if the status column (Column F) is 'R' or 'Y'.
The number of rows in the detail worksheet can change each week (as few as 0 and as many as 100)
View 2 Replies
View Related
Apr 24, 2014
Formula that will repeat a cell number as it drags down and as soon as the number changes. I am using helper column that shows the cell number. I need to drag this down about 1000 rows.
Excel 2010
A
B
C
1
Helper Column
Desired Result
[Code].....
View 6 Replies
View Related
Jul 30, 2013
I have chart like below. In empty cells I want either 1 or 0 (1 if software is installed and 0 if not).
Excel
Outlook
Powerpoint
Word
Computer1
Computer2
Computer3
Computer4
Computer5
Data of computers and their software are like this:
Computer1
Word
Computer1
Excel
Computer1
Powerpoint
Computer1
Outlook
Computer2
Outlook
Computer2
Excel
Computer3
Outlook
Computer4
Outlook
Computer4
Excel
Computer4
Word
Computer5
Outlook
So called Matrix Lookup was very close, but it finds data FROM Matrix (aka that first table). Is it possible at all?
Excel and Windows version:
Excel 2010 SP1
Windows 7
View 3 Replies
View Related
Apr 11, 2014
I am using excel 2010 and I am trying to find a formula whats going to give me added break with a set time but anything over a set time doesn't. I want it over 10:58:00 and under 11:32:00. I've got the numbers and tried with a formula but all whats happening is that all the data is adding 30mins break to the end time.
The sheet is using live times and data so the start times vary as do the due time.
View 1 Replies
View Related
Aug 27, 2013
I have a sorting question in Excel 2010. Attached is an example workbook with a simplified version of the situation.
I want to sort a table multiple times. I have a table with part numbers and alphanumeric locations (Row, Shelf, Bay, Slot). I have formulas that divide up the location into 4 separate columns to be able to sort.
The first sort I do is by location, which I can easily achieve. The issue I have is sorting AGAIN by part number, while keeping the original sort somewhat intact. If a part number shows up multiple times (i.e. in two DIFFERENT locations), the Nth instance might show somewhere down the list.
Is there a way to sort my table to where you keep it in location order WHILE accounting for duplicates, which I would want grouped together in location order? Please see attached file : SortExample.xlsx
View 8 Replies
View Related
Apr 2, 2014
When I run macros usually they're fast, but occasionally will run very slow. An example macro I have is pasted below. It's just a simple macro that pastes months. If I am pasting on top of a cell that contains a month it pastes the rest of the months that follow.
Most of the time this macro runs very fast, but occasionally it takes about 1-2 seconds to run, and it is a very simple macro! It is not macro specific, as all my macros will be slow. I''m using Windows 7 with Excel 2010. I'm only using 23% of my CPU and 4.5GB of my 16GB of RAM, so I don't think it's a hardware thing.
Is there some kind of condition that occurs that will make excel run macros slower?
[Code] .....
View 4 Replies
View Related
May 3, 2013
I am looking for a macros VBA where a user insert or update a data the date and time should be insert in column I and save the workbook.
Note: If the column I already have the date and time inserted before then it should give message record already have date and time.
I am using office 2010.
View 9 Replies
View Related
Jul 2, 2014
I work for a freight company and have been trying to create a macro for a spreadsheet that I have to create every single day. I pull a report from a program called the AS400 and it sends me an excel spreadsheet with information about certain shipments such as close time and arrive time (which are in military time such as 16:00) along with driver names.
Anyways what I need to accomplish is to highlight the entire rows font in red if the driver arrived an hour or more past there close time. When I get the spreadsheet the military times are not showing in the HH:MM format under format cells. So I select the HH:MM format and try to do a formula such as Arrive time cell (M1) - close time cell (L1) to get the time difference it shows as #VALUE!. I've tried to convert it to different time formats and nothing works. The values just stay the same and will not allow me to do calculations with them.
At first I thought this was because the program was sending those values as text. I tried to use the date>text to columns>finish button on the columns but did not work. I've tried to remove the":" then use the HH:MM cell format but still wont work. I've even tried a time value formula to try to convert the values such as =TIMEVALUE(LEFT(A1,2)&”:”&RIGHT(A1,2)).
But nothing works it will not allow me to add or subtract from the time values no matter what I do. I am running excel 2010 on Windows XP the english version.
View 9 Replies
View Related
Jun 18, 2012
I need excel 2010 to automatically save at 09:30 and 19:45 every day monday-friday. Also need the file name saved to reflect the time and date it was saved - if possible.
My PC locks after 10 minutes of inactivity - unfortunately this has to happen because of where my PC is situated.
View 1 Replies
View Related
Apr 1, 2014
I'm using Excel 2010 on my Mac. I would like to set up the data as follows:
A
B
C
D
E
F
NAME
DATA X
DATA Y
DATA Z
DATA XX
DATA YY
NAME
90%
88.2
410
88.4%
97.8
[Code] ........
Now what I would like to do is have the data in each column highlighted a certain color based on specific ranges. For example in Column B I want anything from 92% - 100% highlighted blue. I would like 83% - 91.9% highlighted purple, and anything under 83% highlighted red. Do I need to have a conditional format entered in each cell? Can I set up a conditional format for the whole column? Once I can figure the formatting in my example the remaining columns will be a breeze since they will be set up in the same manner just different number ranges, same colors will apply.
View 2 Replies
View Related
Jul 2, 2012
I have a range of cells each containing a name. Based on a number that has to be entered manually I want excel to return the names concatenated in one cell. So for example:
Number of variable entered: 5
q9001
q9002
q9003
q9004
q9005
q9006
etc.
Should give me: "q9001 q9002 q9003 q9004 q9005"
I have been trying to work with formulas using IF and CONCAT functions. But so far I haven't figured out how to have excel return me the correct amount of variables for each separate number that can be entered seeing the number of variables entered can vary from 1 up to 50.
(Using Excel 2010)
View 7 Replies
View Related
Jan 10, 2013
I am trying to create a sheet in XL 2010.
In Column A each cell will contain a date (differnet from other cells in that column) when inspection was last done.
Column B is when the weekly inspection is due.
Column C is when bi-weekly inspection is due.
Column D is when monthly inspection is due.
Column E is when 6 monthly inspection is due.
I need a formula to change the colour of cells B, C, D & E when each inspection is due depending on the date entered in A
I am hoping its possible that the cell colour can stay for 2 days after the due date and then return back to blank after the second day.
For example if cell A1 has a date of January 1 2013 then on January 8 2013 cell B1 turns red then on January 10 2013 the cell returns back to normal.
A1
B1
C1
D1
E1
Inspection Date
Weeekly Due
Bi-WeeklyDue
Monthly Due
6 Monthly Due
January 1 2013
Change red Jan 8 & return blank Jan 10
Change red Jan 15 & return blank Jan 17
Change red Feb 1 & return blank Feb 3
Change red June 1 & return blank June 3
Ive also attached the worksheet
View 1 Replies
View Related
Jun 4, 2013
I need to display a set of cells based on the value of two drop down cells i have. As I am not very good at english and worse at explinations, I'll try via screen shots...
I have two dropdowns (C4 and C6) that will indicate what table to use (Second sheet / screenshot). I want that "table" to display in the yellow box on the first page. To complicate matters, some options do not have a CLA option - those starting with X. As there are 24 different outcomes and each is 3x9 if/then statements just dont seem to cut it.
P.S. I have excel 2010 and windows 7
View 1 Replies
View Related
Apr 30, 2014
Two formulas which I need in Cells E74 and E75.
Basically the formulas will depend whether the entry in D73 are Yes or No
in cell E74, IF D73 = ‘No’ then E74 = D74 + E70 ELSE IF ‘D73’ = ‘Yes’ then E74 = E70
in cell E75, IF D73 = ‘No’ then E74 = D74 + E70 ELSE IF D73 = ‘Yes’ then E74 = E70
Excel version 2010
View 4 Replies
View Related
Mar 6, 2014
I am using Excel 2010 and trying to change/edit the color of the tabs in my workbook to turn green or red based on a y or n placed in a cell (the same cell on each tab). I have tried variations on several themes others have asked about as well for Excel 2007 and attempted to adapt them to fit my situation but none seem to work. Here's what I was starting with:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is < 2.5
Sheet1.Tab.Color = vbRed
Case Is > 2. 5, Is < 4
Sheet1.Tab.Color = vbGreen
End Select
End Sub
The cell I'm using is F2 and my cell value is simply y or n. I realize the example above references numeric values and greater than/less than options, but I'm not sure how to correct this for my need.
View 10 Replies
View Related
Sep 23, 2011
I have a massive spreadsheet (ca.110 000 rows [excel 2010). I need to cut this monster by deleting all the cells that do not have a certain cell value within them.
Say that in my column A there are different entries (text type). I would like to delete the ones that do not match the following criteria:
"mytextascriteria*", where * somehow stands for the rest of the string.
Strictly speaking I can only determine beggining of the string I want to perserve but the values at the end of that string are changing.
I found the thread about deleting entire row based on a cell value here:
Delete entire row based on one cell?
but I couldn't quite work out how to apply it in my scenario....
Otherwise is completely pointless to do it manualy with these amout of records.
View 5 Replies
View Related
May 21, 2012
I'm trying to delete a range of rows based on the value of a given cell. For example, if cell AC1 shows 5000, then I'd like to delete (not just clear) the range A5000:AA1048576. Or, if cell AC1 shows 10000, then I'd like to delete range A10000:AA1048576. I've come up with what is below but I don't think this is the right way to do it. I am using Excel 2010.
Code:
Range("AC1").Select
ActiveCell.FormulaR1C1 = "=COUNT(C[-27])+2"
Calculate
Range("AC1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A" & Range("AC1").Value:"AA1048576").Select
Selection.Delete
View 5 Replies
View Related
Aug 7, 2012
The formula I found is close but I need it to count, not sum.
=SUMIFS($C$36:$C$51,$B$36:$B$51,$B36)
Example data: [972 1] [972 2] [972 3] [214 1] [214 1] [765 1] [765 2]
I want the formula to count the different numbers in the second column based on the first column. The results should show, 972 equals 3, 214 equals 1, 765 equals 2.
I am trying to separate this out but it keeps putting this paragraph.
View 3 Replies
View Related
Jan 27, 2012
I have a question on how I could populate data using a combo box selection in Excel 2010.
For example, I have a table with values in Sheet 1, & below that table there is a combo box whereby another table of values can be populated based on the selection of the combo box.
Maybe to make it clearer...
Table 1
Name | Address | Phone number
Andy | Avenue 2 | 999
John | Road 5 | 998
Combo box (selection of names): John
Data derived from combo box - Table 2
Name | Address | Phone number
John | Road 5 | 998
how I could solve this Also, do let me know if this can be done without the use of VBA.
View 4 Replies
View Related
Mar 15, 2012
I have been using a macro to search and highlight customer addresses for me, however I have changed my worksheet and now have the addresses in two columns instead of one (D for the numbers, E for street names) for sorting purposes.
What I would like to do is either; find a way to search using data from 2 cells to get a result, or have multiple results highlight and popup.
Using: Excel 2010
Code:
Sub SEARCH_FUNCTION()
Set FoundCell = Sheets("Route").Cells.find(What:=Sheets("Intro").Range("G15"), LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If Not FoundCell Is Nothing Then
With FoundCell
[Code] ...........
View 2 Replies
View Related
Jul 17, 2014
Is there a way in Excel (2010) to lock data from being entered into cells based on the value in another cell? Here is an example:
Row 4 contains dates from 2015-2030 as a header starting at column C (C4 and on) that represents years of revenue. Column B contains dates as well, this date can be any year but this becomes the driver for the data input in columns C through X. Column B contains the "Delivery Date"
Data is input in Columns C and so forth. The issue becomes that let's say that the date in C4 is 2016 and this is the beginning year. Obviously there should be no inputs for 2015 (C5) and the data should start to be input for this year at 2016 (C6). Often people just begin filling in the first available year not looking at what the year actually is.
Is there a way to add a formula or some logic/protection to prevent inputs in previous rows based on the values in column B? So if the value in column B is XXXX than there can be no inputs in cells less than that value?
View 6 Replies
View Related
Dec 19, 2013
I have a single work book with 8 sheets (I am using Excel 2010 BTW) and I am trying to find a total of times a word appears across all the sheets in column "C"
I found this formula on another thread. =SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3}&"!C1:C1000"),"="&H3)) with an example. I made the changes that I needed for my purposes
This worked but only after I renamed the sheets to Sheet1, Sheet2, etc.
Is there a way get the same results from the above formula if all the sheets are named after our reps? Example: sheet1 is named Dan, Sheet2 is Nick, etc?
View 2 Replies
View Related
Mar 20, 2014
Excel 2010 - I need to create a graph that shows a week's use of a sportsground showing what sports were played, on which days and between which times. I thought I could show the times on the vertical axis, days on the horizontal axis and then the sports played in those times, however I'm unsure as to how to get the graph to recognise the times.
I've attached an example of some data and how I'd like to see it, I'm just not sure how I can do this using the chart set up!
Attached File : Graphs.xlsx
View 10 Replies
View Related
Feb 9, 2014
How do I enter a formula in excel 2010 that will give the total amount of times each number is in this group. Example : how many times (total) the number 12 showed up , how many times the number 27 showed, and so on for each number that is in the entire group of numbers, from 1 to 80 .
Here is the page I will copy and paste into a workbook sheet from the internet that i want to evaluate the times each number was called.
Very new to all this , I am a bit aged and need not to learn excel A to Z, just need to know what correct statements /formulas have to be entered to do what i desire.
I am only interested in the total count of the small bold numbers 1 to 80, each single digit 1 to 9 and double digits 10 to 80 will be in their separate cells. The large bold three digit numbers and dates/times will have to be erased (manually) before the calculation takes place.
298
2/9/2014 12:28:02 PM
37
77
[Code]....
View 6 Replies
View Related
Dec 19, 2013
a macro to insert rows based on certain cell values in column A.
I have uto 300 rows of data. Below is an example of column A.
R1
1
2
3
4
5
6
7
[Code]...
If (above the R) is an 8, I need to insert 2 rows above that R and directly below the 8.
If (above the R) is a 9, I need to insert 1 row above that R below, directly below the 9.
(Below the R there is always a minimum of 8 digits with the 9 and 10 being random).
I have excel 2007
View 5 Replies
View Related