Macro To Segregate One Column List Into Three Columns Based On Condition

Nov 21, 2012

Lets say we have data in Column A, B, C and D and no row left blank. In the column A no cell left blank however in B, C, D any one cell only contain a value in that row. If B10 has any value in it then C10 and D10 are left blank (not empty). I want to segregate the data in Column A based on the value in B, C or D. So this one column data ( that is Column A) will split into three column. this segregated data to be put in E, F and G.

Wherever Column B has any value that's greater than zero content from the column A from the same row should copy to the E, Wherever Column C has any value that's greater than zero content from the column A from the same row should copy to the F, Wherever Column C has any value that's greater than zero content from the column A from the same row should copy to the G.

View 4 Replies


ADVERTISEMENT

Populate One Column Based On Condition Of Two Other Columns

Jan 17, 2014

15.png
Attached is the file & snap shot for the problem.

TABLE A
[table="width: 500, class: grid"]
[tr]
[td]Catagories state names devices
A4-100HP A ALT

[Code] .....

TABLE B
Catagoriesstate names devices
A4-100HP
A4-101MP
A4-102AP

[Code] ....

In above condition we want to have an automatic filling up of data in table B in column (name & device) but it should match first with state name with category codes of table B & then same with table A in order to avoid any wrong entry because in table A certain states are repeated but codes are unique so we want that filter should match two column of each table before filling data in table B.

View 5 Replies View Related

How To Segregate Amount Based On Validity

Apr 7, 2012

I have amount, Activation date & Validity in days. I want to segregate the amount on days wise.

E.g. acgtivation date is 1 mar, validity is 45 days and amount is 900 then it will show 2 in each day from 1st mar to 14 Apr and on 15 apr it will reflect 0.

View 1 Replies View Related

Segregate Data Based On The The First String Of Each Security Description

Jun 12, 2009

a macro that will segreate data based on the the first string of each security description under the heading Security description and then sum the total on a separate row in the total column.

Starting row hearder in sheet "Raw_Data" start in row 6 and i would require the same in sheet "Result

Sheet "Raw_Data ...

View 9 Replies View Related

Segregate Data From Particular Column Of Master File

Nov 28, 2013

I need to segregate a data from a master file with a particular column as a main.

for eg:- i have customer details with name in a column
address in b
mobile in c column,stat and other details in other column.

I want to segregate data according to state in different excel so how can i do the same.

View 3 Replies View Related

Excel 2007 :: Make One List Out Of Columns Based On Common Information In Column C?

Oct 12, 2011

Is it possible to take the information below and make one list out of columns F, H and J based on the common information in column C? For example, group all the 18s in a list, followed by the 44s.this is excel 2007

column CColumn Fcolumn Hcolumn J

Option code
18180L12369301/123/54
18180L12369301/123/54
18180L12369301/123/54[code].....

View 2 Replies View Related

Macro To Copy 2 Columns To New Sheet Based On Value In A Different Column

Jul 4, 2014

I'm trying to create a macro that will look at the values in one column (column G) and whenever there is a new value, it will copy the data from 2 other columns (I and J) into a new sheet with the original column as the title. I can't think of a better way of explaining that so I've attached a sheet with 'Raw data' being the source sheet and 'Outcome' being the hoped for final product.

I have color coded the sheet to show where the data is coming from, but do not want the colors in the actual sheet.

View 8 Replies View Related

VBA Copying Based On Columns Condition

Jan 24, 2014

I have three columns - as listed below. I need a script - That compares "result 1" and result 2. If there are data in the "result 1" column then input that into the "City" column. Else input "result 2" data (if any exist), else leave blank.

"Result 1" always has priority over over "Result 2".

City
result 1
result 2

San Fran
San Fran
New York
Tampa

View 4 Replies View Related

List Information Based On Cell Condition?

Nov 3, 2011

I would like to filter my list to show rows with a date difference of >0 (raised date later than date of contact) and move certain cells onto another sheet in the same workbook.

e.g if diff in F1:F1000 is >0, populate the following onto this sheet

Job no - Address - Postcode - Name - Date raised

Would this be a case of using a vlookup? having a few problems with it at the moment

View 9 Replies View Related

Calculate The Average Of A Group Cells In One Column Based On The Condition Of Another Column

Oct 2, 2008

I'm trying to figure out if there is a formula I could use that will calculate the average of a group cells in one column based on the condition of another column. It's hard to explain, so I will show an example. All the data is on a one worksheet and I'm trying to show totals and averages on another worksheet. Location, Days

17, 4
17, 3
17, 5
26, 4
26, 8
26, 10
26, 7

On a different worksheet I would want to know what the average days are for each location. So is there a formula that I could use that will look at column A for a specified location number and then average all the days in column B for that location? I'm using Excel 2003 and have tried using the Average(if) but with no success.

View 2 Replies View Related

Create Unique List From Column With A Condition

Jun 3, 2007

I have a test sheet thus :

+ABCDEFG
1Bob11234
2Sally2
3Ann3
4Emily4
5Lexi3
6Bill2
7Josh1
8Jacob2
9Mary3
10Gary4
11

In D2:D11, I want a non-duplicate list of all the "1" names, i.e., Bob and Josh. In E2:E11, a list of all the "2" names (Sally, Bill & Jacob), and so on. Sorted would be nice, but not necessary. When new names and their numbers are added to A1:B200, they need to automatically show up in D2:G:201 as appropriate. I've looked over VLOOKUP, INDEX, MATCH, etc., but all seem to simply return the first and not every match. Maybe I'm just missing it.

Is this possible without VBA? Not that I have any objection to it, but delving into and learning it is a little outside the available time I have now. If it takes VBA I'll address it when I can free up some time.

View 5 Replies View Related

Delete Columns From All Sheets Based On Condition In X Workbooks

Mar 28, 2008

I am sure this is a very simple questions. I am using the below code to work on the worksheets on a workbook called "MF BANK EXPOSURE SUMMARY.xls" so far the code that I am using is:

Sub Commandbutton2()
Dim iCol As Long
Dim Isheet As Long
Dim Item As Worksheet
Set MFBANK = Workbooks("MF BANK EXPOSURE SUMMARY.xls")
For Each Item In MFBANK.Worksheets
With Item. Range("A1:T65536")
For iCol = .Column + .Columns.Count - 1 To 1 Step -1
If IsEmpty(.Cells(65536, iCol)) And IsEmpty(.Cells(1, iCol)) Then
If .Cells(65536, iCol).End(xlUp).Row = 1 Then .Columns(iCol).Delete
End If

Next iCol
End With
Next Item

End Sub

I would like to extend the code so that it works on the worksheets of two workbooks at the same time the one being the "MF BANK EXPOSURE SUMMARY.xls" and the other being "MF CP EXPOSURE SUMMARY.xls" .

View 3 Replies View Related

Count Occurrences Based Condition In 2 Dynamic Columns

May 9, 2008

I have been trying the whole day to create a formula to solve this but I just can't get it. To make it simple, let's say I have column A filled with different people names, column B filled with Level of Complexity and column C with the Activity (work task) title. This table is fed dynamically, so the number of rows can vary from 2 to 2000.

What I want to do is count how many times a single name appears related to the same complexity, so I can tell how many "simple, medium or complex" tasks each person has in their work queue.

A simple table example would be:
colA colB colC
Dan Complex Build House
Dan Complex Build Shopping center
Dan Simple Take dog to walk
Jose Simple Clean desk
Maria Medium Paint office roof

Then, on another cell I'd like to have a formula automatically telling me that Dan has 2 Complex tasks and 1 Simple, and so on - considering number rows is not a fixed number. What I have so far is this: =SUMPRODUCT((Data!$I$2:$I$457="Dan")*(Data!$L$2:$L$457="Complex"))
But I need to tell a specific last row, and if the data worksheet gets updated with less data (say 450 rows) the formula breaks...

View 3 Replies View Related

Condition Paste Formula In Column N Based On Column A

Sep 7, 2009

I am wanting to paste formula from N1 till N X (X = varaiable row) where X reliant on Column A Row X. If Column A Row X has character "=====" it should paste N1 Formula all the way down till N Row X which is equal to A Row X containing "=====" .

I might be sounding complicated over here but it is a simple equation.. I have tried to approach this in the capacity i could by condition if Column A row x is blank delete the row.

View 2 Replies View Related

How To Use Form Control Dropdowns To List Items Based On Condition

Jun 16, 2014

I have 2 dropdown lists.

The 1st shows the portfolio list and the 2nd one should display project names based on the portfolio selection in Dropdown1.

My data resides in another sheet where Column B is the Portfolio list,Column C project list and Column D to X some data related to the project.

I have to give cell link reference to the project selected in dropdown 2 so that the other values in the dashboard changes based on a vlookup formula.

I have attached the sample sheet for reference with some dump values.

Dashboard sample.xlsx

View 3 Replies View Related

Concatenate Column Based On Condition?

Aug 13, 2013

I need a formula to be placed in cell Col A, Row 1, that concatenates any and all cells in Col A, with a ';' separating each item. I only want this concatenation performed ONLY IF an adjacent cell in Col B contains the letter 'X.

Additionally, if the cell in Col A is null, then I the formula to ignore it, and not perform the concatenation.

Is there a way to do this formulaically?

View 1 Replies View Related

Sum Values In Column Based On Condition In Another

Oct 7, 2007

II want to sum the values under 'amount' column only if the corresponding value under 'Balance' column is "Paid"

NameAmount Start Date End Date No.of DaysInteresetBalance
Sat1 250 1-Aug-07 20-Aug-07 19 - "paid"
Sat2 550 4-Aug-07 20-Aug-07 16 -
Sat3 250 10-Aug-07 20-Aug-07 10 - "paid"
Sat4 450 6-Aug-07 20-Aug-07 14 -

Total PAIDAMOUNT(B1:B4)

For the above, the sum value should be 500. I have written the following function to calculate the same. On uncommenting the line 'paid = CStr(paidvar)' the value is displayed as '#VALUE!'. On uncommenting all commented lines, the value is displayed as 'Paid'.

Function PAIDAMOUNT(amountRange As Range) As Variant
Dim count As Long
Dim paidvar As Variant
Dim paid As String
Application.Volatile True
PAIDAMOUNT = 0
For count = 1 To amountRange.Cells.count
paidvar = amountRange.Offset(count - 1, 7 - amountRange.Column).Value
'paid = CStr(paidvar).................

View 2 Replies View Related

Excel 2010 :: Macro To Copy Data From A List In The Next Column As Per The Current Column List

Mar 27, 2014

I am using Excel 2010. I need to copy a list from any Column on the right to the existing Column. See the sample file.

View 10 Replies View Related

Copy Cell Value To Different Column Same Row Based On Condition?

Oct 13, 2012

I've schedule header date 1-oct,2-oct,3-oct.....etc and have two cells Last Date and Hours I need from those cells once i add date and hours to copy the hours and paste in schedule header in the exact date..

for example
#
Last date
Last Hours

[Code]....

but was too slow takes long time.

2nd VBA code to copy last hours to schedule date based on condition on last date cell.

View 3 Replies View Related

Finding The Maximum Value In A Column Based On A Condition

Nov 7, 2008

This should be simple to do but I can't figure it out. I have a database that lists operating room numbers in one column and the length of the surgeries performed in those rooms in another column.

I need a formula that will give me the longest OR time for a given room. For example the room numbers are in column A and the OR times are in Column B. I've tried something like

View 6 Replies View Related

Selecting Rows Based On A Column Condition

Jun 4, 2009

I have a worksheet which is created monthly by one of our company's employees which reports results for that months operations and successful audits. These audits are separated into various service lines and on the report which is submitted it takes on the following format:


1|Service Line|Data A|Data B|Etc.
2|___CR_______| Data | Data | Etc.
3|____________| Data | Data | Etc.
4|____________| Data | Data | Etc.
5|____________| Data | Data | Etc.
6|___DD_______| Data | Data | Etc.
7|____________| Data | Data | Etc.
8|___MS_______| Data | Data | Etc.
9|____________| Data | Data | Etc.

What I want to do is use a macro from another sheet that has the effect of: While ServiceLine = "CR" copy the row of that line and move it to my monthly summary workbook, sheet 1. Then when the Service line changes to DD have the macro copy that information to the monthly summary workbook sheet 2, and so on. The problem is, if I test the Service Line column each time it will be an empty string the majority of the time and I'm not sure how to combat that with my If, Do, For, and While statements. As I've thought about it there are two solutions that I can think of: someone knows of a way to test the row only if it has information in it, or if there is a way that I can copy the service line information down until the change in service line so I can test Service Line on each Row.

View 3 Replies View Related

Filling Column Data Based On Condition

Nov 20, 2012

I have an excel sheet with 2 tabs. 1st tab provides the data for downtime of a manufacturing line. The last column (shift) is blank and needs to be filled based in shift schedule in tab2

On the 2nd tab I have the shift schedule, which tell which shift is working on particular days

Month
Date
7:00am- 7:00 pm
7:00pm - 7.00am

Feb
1
Shift A
Shift C

[Code] ........

Is it possible to write a macros that will look at the Date and time from tab 1 and assign the correct shift number in the shift column. For example the 1st row of tab 1 reads (Month=Feb, Date = 3:55:59 AM) so according to shift schedule it would fill C shift.

I have lots of data and to assign every event to shift # manually is not possible. So i wanted to know if there is a macros i can use to make life easier and learn at the same time

View 2 Replies View Related

Exclude Rows Based On Condition In 1 Column

Feb 7, 2009

I have a worksheet that I want to export to a csv file. However, there are multiple rows that I want excluded in the export. These lines are recognized by the word "No" in column E. Is this possible?

View 3 Replies View Related

Match Column And Colour Based On Condition

Feb 22, 2007

i am trying to do is match 2 columns data based on a condition ie i have data in column "b" of sheet called "balance" data is variable this column has unique indentifiers i want to look at another column and match the uniques identifiers in another sheet if the cell value in column "D" = "please investigate" otherwise do nothing, the (column f) it will be looking up too is in sheet called "hi- port" so if cell value in column "d" of sheet"balace"= "please investigate" match values that are same from colum "b" of sheet "balance" to that of column (f) sheet called "hi-port"

i would like to colour only entire row of sheet called "hi-port" when the data matches to other sheet ie from columns "f " too " b". colour can be any colour
igonre my ranges they are wrong just used as example

Sub start()
Dim oWs As Worksheet
Dim oRngCheck As Range
Dim oCl As Range
Dim cCola As Range
Dim cColb As Range
Dim rngIRd As Range
Dim rngACs As Range
Dim Match As Boolean
Set rngIRd = Range("a1", Range("a65536").End(xlUp)) 'define the rang
Set rngACs = Range("b1", Range("a65536").End(xlUp)) 'define the rang
Set oWs = Worksheets("balance") 'change to suit
'starts at b2 to llow for header row.......................

View 4 Replies View Related

Delete Rows Based On Condition Of 1 Column

Oct 19, 2007

I would like to Use my Excel VBA program to search each row in a csv document for a name (located in a cell ) if the name exists then I would like to delete the entire row.

Whenever I try to do the above in excel, even when I save in csv format the file formating or something gets changed and the file which has to be procesed through another program then process incorectly.

Is there a way to do what I need while retaining the formating which must obviously be changed when the file is opened in excel?

View 9 Replies View Related

Cut &Paste Based On Condition W/ Macro

Feb 18, 2009

I have a spreadsheet that I need to cut and paste data from one tab to another but only from columns B:K (as the spreadsheet has formulas that can not be alterred after column K. It must also paste that data for the hidden columns.

The condition on the data to be pasted in based on the tabs along the bottom.

So for example, anything that says Corn Products needs to be cut from the "standard customers" tab and moved to the Corn Products tab, and so on for the additional tabs.
I then need to un-check (hide) Blanks from the filter on the Standard Customers tab.

If possible, I would like run the Subtotals function in this same macro; the conditions for that are as follows

For each change in Shipper, Subtotal Billing for <<month>> (Column S)
Page break inbetween each Change in Shipper, then I would also like each subtotal figure bolded.

Also, this is something I must do every month, and each customer may have more or less lines or no lines at all in any particular month.

View 14 Replies View Related

Macro For Enter A Value Based On Some Condition

Mar 4, 2009

Currenty i am designing accounting related excel design. In that i need one macro for entering the value in a table based on some condition. I explaine the concept behind this, could some one able to help mean please share the information

I have a xls worbook with two sheets.
in the first sheet contain the column for entering the values.
in the second sheet having one small table withdate and Numbers.

i need to enter the values in the first sheet S.NO, Date and Value. when i enter the value in the first sheet, the date and S.No is compared to the second sheet table Date and the S.No and the value should be placed in the appropriate cell.

View 9 Replies View Related

Vlookup Using 2 Condition One Based On Devices And Grouping Column?

May 27, 2014

Attach below are 2 sample file and inside it consist of device,grouping and lb1,tb1,ab1. How do I use excel formulae based on 2 condition and set from vlookup with 2 condition file to vlookup with 2 condition 1 file like a vlookup.

View 11 Replies View Related

Counting Unique Values Based On Condition In Different Column?

Aug 21, 2014

Formula which will count unique values in column A based on condition in Column B which "y" .....

Show ranges as A:A instead of A1:A100 as I dont know the size of the table, it can be thousands rows .....

View 3 Replies View Related

Copy Multiple Cells Based On Condition In Column

Feb 13, 2008

I need the macro that looks in to say Column H sheet1, if value ="true" then copy cells in column A, B, D, F to Sheet2.

View 2 Replies View Related







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