Copy Rows Based On Conditional Statement

Nov 17, 2004

I want to copy a row based on a certain condition. I have 700 rows of data on sheet 1. If Cells in column A contain an X, copy row A# to sheet 2. If there are more than cell that has an X copy all of the rows, naturally. Can this be done with a simple conditional statement, or am I going to need to generate an array, then write that array to sheet 2?

View 4 Replies


ADVERTISEMENT

Insert New Row With String Based On Conditional Statement

Sep 6, 2008

I've been working on this project to propagate certain products through multiple categories. I chose to use excel to assign multiple categories to each product. On sheet1 I have setup products (column a) and qualifiers in the following columns (color, model, etc). What I would like to achieve is for the user to select yes or no for each category column and and if yes then have the corresponding category breadcrumb string (from sheet2) inserted into one specific column in sheet3. As the user continues to select multiple "yes" from the category columns for that single product, those additional category breadcrumbs get inserted at the end of the list in sheet3.

View 9 Replies View Related

Excel 2011 :: Conditional Formatting Based On Text Match From If Statement?

Oct 2, 2013

I want to highlight a cell if the text displayed from an IF formula is equal to the cell content.

CELLS BK10:BN10 are merged and have entered into them the following text "SELL"

Cells BJ20:BP20 are merged and contain the following formula which currently results in the cell displaying "SELL"

=IF(BM22<=-0.08,"SELL", IF(AND(BM22>-0.08,BM22 < -0.03),"NO INDICATION", IF(BM22>=-0.03,"HOLD")))

Cell BM22 is a percentage calculation of the differences between two different days of volume for this stock and that formula is: =(BH22/BH25)-1 Cell BM22 currently is calculating the result to be -65.65%

When I set up a CLASSIC Conditional Formatting using a formula (="If($BJ$20=""SELL""") to check the if the text in cells BK10 match the text displayed in cell BJ20 - I get no error messages and no formatting?

I am using Mac Office Excel 2011. I feel like I have tried everything including changing the Number selection type of the cells to TEXT. Nothing seems to works.

View 1 Replies View Related

Copy Conditional Formatting To Other Rows

Jan 15, 2010

I'm running a spreadsheet at the moment in 2007, and one of the funcitons I've made it for certain cells to either change format if the number is to big or to small depending on the cell it is.

I have formatted all for one line against duplicate scores on the same line.
The problem is this is time consuming and there are 22 different lines.
Because with Conditional Formating you can't simply drag like you can with formulas, I was wondering if there was a more simple approach. I have demonstrated the formating required on Row 6, and require the same formating on rows 8:10, 14:26, 32:36.

Also, just to make things complicated, the values change for each line.
I have attatched the file. Row 6 with the label DEMO LINE contains all the correct formating I require.

View 3 Replies View Related

Macro To Copy Rows Based On Moving Date And Paste Rows Into Identical Sheet

Jan 28, 2014

I need to build a macro which copies 3 rows every day and pastes the row data into an identical sheet. The three rows will have column "D" as =today(). As the days progress the three rows will change accordingly ( tag to the today's date)

e.g. 28/1/2014
28/1/2014
28/1/2014

I need the macro to recognize the date when pressed and copy the corresponding rows of data and paste them into an identical sheet with the same date. The second sheet is an archive sheet. The date will tick over as per the calendar.

View 9 Replies View Related

Deleting Rows Based On Conditional Formatting

Jun 11, 2009

I'm trying to get Excel to delete entire rows based on the conditional formating i'm using.

Basically, I want to get rid of all the rows that are of a certain color (let's say green, InteriorColor = 4). I've already come up with a way to delete rows based on color, but I have to take into account the Conditional formating i'm using.

Here's what I already have:

View 10 Replies View Related

Conditional Formatting Formula Based On Rows Equaling Each Other

Jan 15, 2014

I have two columns

Column L and Column W

When I input something into Column W, I want it to turn green if it is equal to the corresponding value in Column L

So say we're on Row 50

And I put $280 in Cell W50

I want it to turn green if W50=L50

And red if W50 does not equal L 50

Infinitely in the same column

View 5 Replies View Related

Conditional Copy Row To Another Sheet Based On Cell Values?

Mar 17, 2014

This is also in sheet1 module ( It cuts the respected row and pastes in sheet2 when date/time is populated in column 14 by double clicking).

[Code]....

View 3 Replies View Related

Colour Rows Based On List Colours (No Conditional Formatting)

Oct 3, 2012

As far as I can tell Conditional Formatting will not work for this problem.

What I need now is some code to colour the rows in the data sheet ("Standards_Data"), so some other code (which is working fine) can then colour data points on a multiple graphs (which will be on the "Graphs" sheet). I've played around with as much code as I can find but nothing has the flexibility that I need or doesn't seem to work at all.

The idea is that users can adjust the colours using the Column A on the "Graphs" sheet to best highlight certain things. Also this list could then be edited as old Standard ID's become redundant and new ones come on line.

So in a nutshell: Colour rows in "Standard_Data" based on value of Standard ID (Column 4) according to the corresponding colour found in the list in the "Graphs" sheet.

I've attached a trimmed down version of the workbook.

View 4 Replies View Related

Conditional Formatting Entire Rows Based On Specific Columns?

Mar 25, 2014

I have been trying to find a way of formatting an entire row based on the contents of cells in each column. However i come unstuck when trying to make the column dynamic. Below is an example:

Month
2010
2011
2012


[Code]....

The idea is that i say current year is 2011 and all rows where C contains an a will turn green. What i would like to achieve is that when i change current year to say 2012 the conditional formatting adjusts so that it looks at D instead of C.

View 3 Replies View Related

Conditional Formatting - Duplicate Rows Based On Multiple Columns?

Apr 8, 2014

I'm looking for a Conditional Formatting formula that will check two columns before highlighting the duplicate rows. I need it to be conditional formatting because I know nothing about writing macros or vba (what-ever that is?). Data is entered into Columns A, B, and C. I need to check both column A and C before it highlights the duplicates, based on those two columns. (The format only unique or duplicate values checks only one column.) I have attached an example, but this is just an example, as I have hundreds of lines to go through on the original. (For this example, Row 2 and Row 7 are the duplicates I need highlighted.)

View 3 Replies View Related

Conditional Formula Based On Another Cells / Rows Text / Number?

Jan 25, 2013

I am wondering if I could have a formula be used against a certain row/cell containing a certain "phrase" or "number" for instance

I want E1 to read something like this = (row containing item "FF32105") (the given row from the previous statement) ( the input column ex. B) (the input value ex. *6)

Essential I want to be able to copy and past a sales forecast and have the formulas automatically (listed below the pasted forecast) calculate purchase needs. The issue is that if our forecast one month has a certain item and then the next does not then they will end up on different lines after the copy/paste. We have over 500 items so a manual adjustment would be time consuming..

Is there a possible way for the formulas to "find" the correct line to start calculating data?

View 6 Replies View Related

Hide & Show Rows Based On Multiple Conditional Formatting

Aug 6, 2009

I am trying to hide/show entire rows of a range based on the conditional formatting in the row. I want all rows with at least one overdue training cell (indicated by a red cell) displayed, and rows with no overdue training hidden. The conditional formatting formulas vary greatly, but always result in a white (unchanged), yellow, or red cell. Here is a sample picture for reference:

[url]

The CF formulas vary based mostly on two major factors: the frequency of the requirement found in Column "C" (Monthly, Quarterly, Semi-Annual, or Annual Requirement), and the personnel's arrival on site or date of departure (wheels up) found in Rows("3:4"). Each training class has two rows. The first row indicates the last time the class was completed, and the second row shows when it is due next. Both rows have to be displayed/hidden based on the second row's conditional formatting. Here is the code I am using right now: ...

View 3 Replies View Related

Excel 2010 :: Conditional Formatting Of Table Rows Based On Value In Column?

Jan 2, 2014

I'm working in Excel 2010.

I setup a table with a column titled "Type". Each value under column "Type" defines the type of row it is: "Section", "SubSection", "SubSubSection"

I wish to create a set of conditional formatting rules that apply to data rows in this table, each rule controlling how cells within a whole row should be formatted, according to the value found in "Type", for that row.

Example:

Rule1: [@Type]="Section" -> fat red line on top of cell.
Rule2: [@Type]="SubSection" -> thin black line on top of cell.
Rule3: [@Type]="SubSubSection" -> dashed black line on top of cell.

I can't seem to make this work.

How can I leverage the nice column names, and the "@"-this row designator, within a table to create conditional formatting rules that apply to all the cells within a row, in the same way one can refer to in table formulas?

View 2 Replies View Related

Fill Conditional Cell Values Based On Unknown Number Of Rows

Dec 15, 2009

I have a set of data in column R, with an unknown number of rows that looks like this

Days Late
-28
150
3
16
41
.
.
.

and I have written a script to add an adjacent column "S". I want to fill column S with conditional values based on the value of column R, sorted into categories such as "On Time", "Less than One Month Late", etc. Here is what I have so far, it doesn't work:

View 4 Replies View Related

VBA Conditional Format Range Of Cells Based Upon Criteria In One Cell / Repeat For All Rows

Apr 3, 2014

Code is trying to

1. Where there is data in column B
2. Goto first row of data
2. If column J = "Closed"
3. then select Cells from column B to J in that row and colour these cells in red
4. If column J= "Open"
5. the select Celss from column B to J in that row and colour these cells in grey
4. Repeat for next row until you get to cell in column B where there is no data.

Recieve run time error 1004: Method 'RAnge of object_GLobal failed

===============================================================
Sub Colourclosed()
Sheets("Risks").Select
Dim LastRow As Long
Dim i As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For i = 8 To LastRow
If Range("J" & i).Value = "Closed" Then Range("B", "J" & i).Select
Selection.Interior.ColorIndex = 3

[code].....

Note: I've managed to do it for one cell ie for Column B by replacing "If Range("J" & i).Value = "Closed" Then Range("B", "J" & i).Select with "If Range("J" & i).Value = "Closed" Then Range("B" & i).Select" This works but only colours in cell in column B, how do i do this so it colours range of cells

View 4 Replies View Related

Copy Rows Based On Cell Value?

Feb 23, 2012

WS "Activities" has a list of dates in col B (Inputted as 02/01/2012, 04/01/2012, 01/02/2012 etc.) (Formated as 02-Jan-2012, 01-Feb-2012 etc.)

WS "MonthReport" is where the rows are being pasted Currently the code will paste rows based on the search string in MonthReport("B1") So - If I type 02/01/2012 in B1 it copies all the rows where that is the date.

What I need it to do is be able to search for "January" and then return all the rows where the date is between 01/01/2012 and 31/01/2012. (Or all of Feb, Mar etc dependant on what is in MonthReport("B1")

Private Sub CommandButton1_Click()
Dim LSearchRow As Long
Dim LCopyToRow As Long

[Code].....

View 4 Replies View Related

Copy Rows Based On Cell Value

Oct 4, 2006

I have a list of items with a quantity in the final column. I need the rows to be copied the same number of times as the quantity displayed so that instead of having 1 row with a quantity of 5, it copies this row a further 4 times so that there are 5 rows. how this can be achieved other than manually as is currently the case? I've attached an extract so that you can see what I am working with. Column H holds the quantity (obviously) and ideally should be reset to 1 when the item is copied the relevant number of times.

View 3 Replies View Related

Copy Rows Based On Column Value

Sep 5, 2007

I have a worksheet where I collect ledger balances from 2 different sources and wish to identify out of balance situations. I have done so, but now I need to copy those rows indicated by a "No" to another worksheet (ideally I would like to have those rows printed out directly, but I can do that from another worksheet. I have tried AutoFilter and Sort, but that is not giving me what I want or expect. My question is: How do I code a macro to pull those "No" rows and either print them directly or copy to a new worksheet (WorkSheet2)?

View 2 Replies View Related

Copy Rows Based On Date

Dec 18, 2007

Column A is formatted for date. I need to return entire rows to another sheet that match a certain date. is this possible?

View 3 Replies View Related

Copy Rows Based On Value In Column

Mar 18, 2008

I am looking for code to copy and paste a row into a new sheet based on the data in a particular column. I would like it to look at Sheet 1 Row D and if it finds the word Russell to copy the entire row and paste it into the Sheet entitled Russell

View 4 Replies View Related

Copy Rows Based On A Cell Value

May 22, 2008

have written a macro who can do this job, and offered me to have a look at my data. They are attached

View 4 Replies View Related

Conditional If Statement

Apr 14, 2008

I have to determine based on average number of weeks on hand whether an Item is Overstock, Obsolete, or Normal. I've got that taken care of with some If statements (I'm sure there's a cleaner way to do this but I've not figured that out yet.)

But I need my if statements to be conditional to whether or not an item is seasonal. with 10,000 active SKU's Its a little bit much to manage those in my excel copy of the item table so I wanted to make an exclusion table where I could just key the item in and the months it would be considered active in stock. This needs to go into the If statement on the items table that looks at the current date and says if it's less than six months old it's a "new item" but if it's six months and a day then it's a normal item, then ignore both if it's seasonal and just be a seasonal item if it is on the exclusion worksheet.

I'm attaching this incase anyone can offer any ideas. It would be much appreciated. I had to delete a ton off of the spread sheet to get it to upload, and the data is dummied to keep company inventory confiential.

View 14 Replies View Related

Conditional Statement

Jul 2, 2007

I have a column with different letters in it. If this column DOES NOT have an L, H or F than I would like it to add a K.
If the column DOES have a an L, H or F then I would like it to remain as is and not add the K.

View 10 Replies View Related

VBA - Copy And Paste Rows Based On A Condition?

Apr 19, 2013

I have tried to write some VBA to copy and paste rows based on the condition in cells A:A in sheet one. So far I have managed to put something together which will paste the first row and insert a new row below but keeps on pasting the same row. But not much else! Not sure I have tried to make it more difficult than what is it.

I would like it to copy a row based on a certain condition ("WRW") in A:A sheet one and paste it to sheet2.

VB:
Function DoOne(RowIndex As Integer) As Boolean
Dim Key
Dim Target

[Code].....

View 3 Replies View Related

Copy Rows From One Workbook To Another Based On Criteria

Aug 4, 2009

I have been struggling to setup these two workbooks for a bit now, and I can't for the life of me figure out a formula to do what I need to do. Essentially, I have one workbook that contains a list of purchase records for my company, sortable by Date, Vendor, Price, etc. and one workbook that has a sheet for every vendor. What I need is a formula that will search column B for a vendor, Allied Waste for example, and transfer all the information within the rows for every instance that vendor is found to the new workbook.

This is basically just a way where I can input information once in one workbook, where the sheets are divided by month, and the info will automatically transfer to another workbook, where the sheets are divided by vendor.

View 2 Replies View Related

Copy Rows To New Sheet Based On Y / N Value In 1st Column

May 12, 2014

I have a single sheet that lists available items, prices, etc. When doing quotes, you simply put y/n in Col:A for each item. I then want a simple macro that will copy all of the rows with "yes" into a second sheet. Sample data with end result attached.

I did try and butcher this macro to do what I want, and whilst it does copy data across, it's not really working. Firstly as I think it is searching along a row and copy columns, whereas I need to search a column and then copy rows.

[Code] .....

Attached File : sample_data.xls

View 7 Replies View Related

Macro To Copy Rows Based On Date

Aug 4, 2014

I am developing a macro that will copy over the row from one workbook to another based on today's date. I have looked but having some trouble finding a solid way of doing this.

View 2 Replies View Related

How To Copy Rows To New Worksheet Based On Cell Value

Aug 10, 2014

I am making a workbook for our 4H horse shows. I want to be able to list the kids on the first page and check off (x in the cell) which classes they will be entering and then have the program move their info to each of the specific class worksheets where we will record the results. I'd like to move rows A thru E to each applicable class sheet. I've attached the workbook.

View 6 Replies View Related

Copy Cells Down Based On Number Of Rows

May 11, 2009

My worksheet has data in column A. A formula is placed in cell B2 (col headers are in the first row). What is the code to copy it down so it coincides with the rows in Column A? If I use the following:

View 6 Replies View Related







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