Merging Cells Based Upon Condition In Different Cell
Feb 26, 2013
I am trying to automatically merge cells based upon a condition in different cell. Below is the example of what I would like to achieve.
Apple
Red
Apple
Red
Apple
Red
[Code] ......
View 9 Replies
ADVERTISEMENT
Feb 22, 2010
I’m having some problems writing a macro,
I have a spreadsheet with 2 columns. The first column is the index number (unique identifier) of the second column’s data that will repeat itself as many rows as needed. Let me try to exemplify it:
Column A (index)Column B (text)
1 AAA
1 BBB
1 CCC
2 DDD
2 EEE
3 FFF
3 GGG
3 HHH
3 III
I’m trying to write a macro that will merge the text of each identifier in the first row it appears. The result I’m looking for is:
Column A (index)Column B (text)
1AAA
BBB
CCC
2DDD
EEE
3FFF
GGG
HHH
III
I already know how to make the merge, but I can’t get the logic to make it go through each row and merge the contents, since the number or rows for each identifier varies.
View 9 Replies
View Related
Oct 5, 2009
I've got a lot of wokbooks allocate in a intranet location (but i can use the explorer so see all of them) like: http://host.company.es/eng/workbooks/Forms/WebFldr.aspx
Is it possible with a VBA code to import the information in all workbooks to only one, like:
From all workbooks i just want the values in sheet2 - Cell A25 and C32
and i want that those values in the new workbook like : cell A25 goes to Cell A2 and C32 to B2. This for the first workbook analised for the second workbook it´s the same cells but it's copy to A3 and B3.
View 2 Replies
View Related
May 23, 2014
Here find the excel file
My requirement
1) 4 values contains in each row based on the values from those cells the max value will display.
2) if more than 2 cells have empty,NR or NA text means the entire row has to delete.
3) if 2 or more that means 3 cells having values the empty cell,NR or NA cell will place value with the condition of macro that is 75% of other values which is maximum among them.
View 1 Replies
View Related
Mar 30, 2013
I have a spreadsheet of barcodes 114,618 rows long. I have a program that requires me to enter in each and every barcode in a certain format. This is the format that it requires me to place the barcodes into.
23423432, 23432342, 234324323, 234322344, 432432432, .............
so and and so forth.
Only problem is my POS system exports the barcodes in a format that looks like this:
545554545435
345435435435
354543534534
354534545453
Now I have a Macro to add a comma to the end of these barcodes. That part was a breeze, however, I have hit a brick wall when it comes to placing them into an ongoing sentence type format, that my program needs. I have found several ways to combine and merge and "justify" the content, however these typically only cover small amounts of content, and doesn't even come close to hitting anything over 100,000. I don't know if maybe I need to be using another program in tandem with Excel.
View 3 Replies
View Related
Sep 11, 2013
How can I let cell F5 for example contain both the texts or contents of cells A1 and B1? Is there a function that can do that purpose?
View 5 Replies
View Related
Oct 24, 2013
I have a spreadsheet where I am trying to add up codes and quantitys, after this I want the repeated info deleted. For example;
12.004RWHB 4 Row Wooden Handle Welders Brush
12.004RWHB 4 Row Wooden Handle Welders Brush
20.004RWHB 4 Row Wooden Handle Welders Brush
24.004RWHB 4 Row Wooden Handle Welders Brush
4.004RWHBSS4 Row Wooden Handle Welders Brush S/S
10.004RWHBSS4 Row Wooden Handle Welders Brush S/S
12.004RWHBSS4 Row Wooden Handle Welders Brush S/S
So what I want to do is add the numbers up so I can get one value. For example, 4RWHB I want to add them all up so that it totals 68 still shows the code and description but then only shows 68 4RWHB 4 Row Wooden Handle Welders Brush and not the same line repeated. I want to condense all the information down so where there is same model numbers I can add it up and it doesn't give me multiples but summarises it down into one line per model number.
View 1 Replies
View Related
Nov 7, 2013
I want to create a string of 0's and 1's in the same cell in excel.
I used the function =randbetween(0,1) to generate 1's and 0's. Just wondered if there is a way to repeat this multiple times in same cell so it looks like 1 0 1 0 0 1 etc... as an example. Or a way to merge cells?
View 3 Replies
View Related
Nov 2, 2009
In the workbook, 3 columns of importance Column N,S and AC. Concatenate order ("S"&"N"&"AC") - combine it and show value in column AG. Column AC has either 0 or any other number (50,60,100 etc). If it is 0 I need to insert an 'F' at the end of the code in column AG, any other numbr and i need an 'O'.
Column N has contract code, this will be in the middle, usually its alphabets like RF,EF, but sometimes numbers like 21,33, etc but when its a single digit number like 6, i need it changed to 06 (need the 0 infront). Column S has exchange codes, and this has to appear in the front of the code in Column AG. Same as Column N, if there is a single digit number then put a 0 infront of it.
View 4 Replies
View Related
Oct 4, 2011
I need to be able to fill a cell in the same row based on values in two other cells in different columns.
Current Layout. Call these columns A, B, and C
I have 3 different states I work with, OH, IL and PA. There are different tax exemptions based on whether or not the class is RES or COM.
Conditions:
State = PA, Class = RES, Tax Exempt = 1
State = PA, Class = COM, Tax Exempt = Null (not "0")
For all other states, Tax Exempt will always = 1
I need the VBA code that will autofill column B with the proper Tax Exempt status based upon columns A and C.
The code I have now just looks at the first value in columns A and C then fills all of column B with that number.
View 6 Replies
View Related
Apr 30, 2014
Column A has data e.g. cat is fat xy>zzy, dog is random xyzzy, rat is a hoax.set xyz, frog is alon.23e xyz, bullseye.8 x.z
I have a look up table as below:
Col D
xy>zzy
xyz
x.z
(Note: the values in Col D do not have a set number of characters, so I cant use a Right/left Formula)
I need a lookup to look for the values in Col D within Col A and return the values in Col D. Is this possible?
All I really need is col D characters separated from the first word/words.
View 2 Replies
View Related
Oct 3, 2008
I've created (with the help of jmthompson from here) a macro to pull an entire row of data and copy to another sheet (Sheet1) if column U has "YES" in the cell.
Now I need to clear the contents of cells in range B-U after the copy has occurred.
Here's the current macro: ...
View 9 Replies
View Related
Jul 1, 2009
I am trying to Excel VBA for doing an AutoSum function in Excel.I am struggling as the recorded macro is giving me fixed ranges whereas the number of rows would be different each time. What I need that the Delivery Qty in Column C be a Total whenever there is a text "Results" in column B?This should happen for every row with Results as a text.In Excel the Autosum feature should take care of this but I am unable to write a VBA code to do this.
Before
DeliveryAct.goods issue dateDelivery Qty
800205573906/05/20094
Results
800205657806/01/200921
Results
800206322306/02/200910
800206322306/02/200915
800206322306/02/200942
800206322306/02/200940
Results
800206322806/02/200941
800206322806/02/200910
800206322806/02/2009455
800206322806/02/2009410
800206322806/02/2009485
800206322806/02/2009785
800206322806/02/200944
Results.................................
View 2 Replies
View Related
Dec 12, 2012
Basicalley I have a series of columns, each 5 letters together represent an order(a,b,c,d,e), the columns are repeated approximately 15 times, similar to the following;
Bag Size:B/G5lb2lb 16oz8ozB/G 5lb 2lb (repeat...)
Catagory 1ABCDEA1 B1 C1 (repeat...)
Catagory 2 AABBCCDDEEAA1 BB1 CC1 (repeat...)
(...Repeat)
The B/G stands for Whole Bean, or Ground, the A's are drop down lists giving those 2 options, the other cells (non-A's) are all numeric. At the end of each row, the orders need to be summed up into categories; 5lb whole, 5lb ground, 2lbs whole, 2lbs ground, 16 whole, 16 ground etc..
I am looking for a way to sum each category for all orders as necessary, in one cell adding all B's (in that row for that catagory) if its corresponding A is whole bean, in the next summing all b's if its corresponding A is Ground. The same will go for the C's D's and E's.
View 1 Replies
View Related
Jul 6, 2014
I will have 2 columns. In column B, will be a list of invoice numbers. Now each one starts with the "job number" (Ex. 51APGC01) then a dash and unique number per invoice. (Ex. 51APGC01-01)
In column A, will be a list of Purchase Order numbers sent by the customer so we can bill. Now, sometimes we get one PO for multiple invoices, (Ex. 03, 05, 06, 07.....)
What I am looking to do, is when I get these PO's, I enter them in and then I print a report for our billing Dept. The way the output line (cell) will read, is Job Number, then each unique number: (51APGC01-03, 05, 06, 07)
There are multiple jobs and each one has it's own report, so the job number will be dynamic and defined else where in the workbook. I can define that. It's just getting the numbers after the "-" and putting them in only.
View 5 Replies
View Related
Mar 25, 2009
I have attached the file with this post.
What I like a macro to do is:
Whenever a 'D' ends in column "Step 5" the last value of 4 cells to the left to be put in sheet 2 in reverse order.
View 5 Replies
View Related
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
Apr 17, 2008
"copy cell range based on conditions" and it didnt really get an answer. There was one that copied the info the next blank cell on that line, but im not smart enough yet to figure out how to copy it over. ( getting there though with lots of staring at code).
2 sheets. I have already created auto modules to fill in data and code,and sorted the columns so they are in line.
Sheet 1. Info : has 9 columns. So if column = 9 and the value = new.
Then i want to copy the range on the columns (A:G) and then paste it on the other sheet ( Card info) as long as Column A is empty ( as in next available blank cell) ( something like a DO while worksheet("Card info").column(A) <> ""
View 9 Replies
View Related
Feb 4, 2010
I am self-taught (arguably by a pretty shoddy teacher), and am determined to figure *some* of this stuff out. I need a code to look at the rows on one worksheet and based on the value of column A for each row, copy cells A through E in that row to cells A through E of a blank row on a corresponding worksheet. I found a code from another post that does just what I need it to with one small exception. The code was posted by DaveGuggs and is as follows:
View 2 Replies
View Related
Nov 7, 2012
Basically, I need to copy and paste upon certain condition (references) and paste related-datas in another sheet corresponding with these references. Every references are organized by lines with indicators on columns.
In attached file, see:
- worksheet ANALYSIS:
* datas in E2, G2, D18, D19, D20, D21, D22 that needs to be copy based on reference in C2,
* then need to find this reference in worksheet called GROUP SAVE,
* and based on this reference, paste above cells value in corresponding "Indicators" column number
THEN, I will have to do pretty much the same with subgroup data. But I can figure out for this second step that request same manipulation.
View 3 Replies
View Related
Sep 24, 2013
I have one column that contains a monetary amount (column AQ) , and another that contains text reading either "inflows" or "outflows" (column AC)
When AC says "inflows", AQ should be positive, and when AC says "Outflows", AQ should be negative.
I need the text in column AQ (the monetary amount) to become red when the the opposite is true.
i.e. When AQ is negative and AC says "Inflows", AQ should become red. And when AQ is positive and AC says "Outflows", AQ should become red.
View 2 Replies
View Related
Jan 26, 2007
how can we disable/enable a cell based on a condition which is dependent on other cell data
View 4 Replies
View Related
Mar 10, 2014
I'm trying to set it up so that if a particular cell has any data in it, the contents of a different cell get sent to another. I want the no data/data to serve as a trigger.
As an example, if I put anything into cell A3, I want the contents of cell A1 to copy to H1. I'd also like it to be dynamic so that if I put something into cell B3, the contents of B1 get copied to H1, etc.
View 4 Replies
View Related
May 20, 2014
I have a workbook sheet change condition that, when triggered runs the following code (amongst others).
[Code] ......
What I would like is to amend the above (possibly in a loop?) so that it skips the rows in which the value "New" features in range F17:F190.
So basically Autofill as per the code but leave the values in the cells of the range in which New features in range F17:F190
View 4 Replies
View Related
Jan 18, 2009
I had an report and the rows of the report needs to be colored based on another cell value. My layout looks like this:
A1B1C1D1AVG
1011121330
14151617100
18192021400
For each cell, i need to compare the value of cell with that value in AVG coloumn and if condition is met, cell should be colored. Eg : If first cell value under A1 is Less than 0.2 * AVG of first row then color of the cell A2 should be red. After coloring the entire rows, then i should check and color the header row based on the color of Rows.
I tried first one, i,e coloring the rows based on conditional formatting and then written VB code to compare the color of rows and colored the header row. But the color index used in conditional formatting and the code are mismatching and the desired output is not coming.So decided to write code for coloring the rows cell.
View 4 Replies
View Related
Jan 1, 2010
I have so data I am trying to combine based on count value of investment on Col A. If it appears more than once on col A then I want the col B values on col D. I have macro that works but I need make sure if Col B have any TRAC and TRL1 then I want to add that on Col D. For example so Col D1 would be EURX, TRL1 at 83.50, FTID and Col D5 would be TRAC at 87.88, Markit. Below is the macro.
View 9 Replies
View Related
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
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
Dec 20, 2012
I am trying to get a Sumifs to work where one condition is activated based on a cell value.
SUMIFS($E$2:$E$6,$A$2:$A$6,"=Region",$B$2:$B$6,"="&B1). I have a drop down in cell B1 that lists all the products.
I want the condition to be active only when I make a selection in the drop down, if I don't then I want the Sumifs to ignore the second condition and do a Sum on Region.
View 3 Replies
View Related
Jun 6, 2009
I have 8 columns of data, the first 4 and the last four columns have the values which correspond to each other.. Here is an example:
VALUES(A to D)NAMES(A to D)
ABCDABCD
1.3451641.3383581.286221.359808321325370391
So value 1.345164 corresponds to 321 and 1.28622 to 370. I need a function that will return a value from one of the VALUES columns which corresponds to the second smallest cell value from the NAMES columns. For example – here the second smallest number in NAMES column is 325 so the function would return the corresponding value of 1.338358.
View 9 Replies
View Related