Compare Cells Against Threshhold & Output Remainder
Jan 7, 2008
I am looking for VBA code to solve a current problem. I have a list of numerical (row) values (Column A) that I am sorting the column (by VBA code) in descending order. Column B is the Bin location. These rows are then output to another worksheet (Column 1 shows the amount and Column 2 displays the Bin location and the amount to be shipped from each Bin). After each output, the original (A & B) columns are re-sorted.
If
Column A = 27
Column B = Bin1
Then
[TABLE]27Bin1;[/TABLE]
The Output should be
Column 1 = 27
Column 2 = Bin1 27;
written as
[TABLE]27Bin1 27;[/TABLE]....................
View 3 Replies
ADVERTISEMENT
Jan 21, 2010
I know that I an probably asking for too much but I must get the formula some way. OK, I need a formula for this:
lets say I have 3 columns (A,B,C (search criteria). In each Column there is a DIFFERENT number. There is 3 more columns (D,E,F (used to compare).Each column has 3 Different numbers. If 3 numbers match between the two sets of 3 numbers I want Column G to display "CCC". IF 2 numbers match I want G to display "CCH". If 1 number is a match I want G to display "HHC". If none of the numbers match I want G to display "HHH".
I can manually do these but it will take waaaay toooooooooo much time to do. If you can do this for me it would be a great help indeed because I'm trying to do other states. With this formula I can use Automate to do a large quantity of numbers.
View 14 Replies
View Related
Jul 30, 2009
Copy and paste the formula into a range or paste a formula into the first cell in the range and autofill down for remainder of cells?
P.S. when autofilling down, can I specify somehow for it to stop at the last row with data in adjacent cell?
View 9 Replies
View Related
Jul 17, 2007
I need a macro that will compare two sheets, find the differences and produce a new third sheet called, results. Both sheets to compare will differ in length of values (one may have 10 numbers to compare, and the other could have 50, Ive attached sample data), and thus this calls for a primary and secondary sheet. I would only like the values which appear in the primary and not the secondary sheet to be reported in the new results sheet.
The problem is that the values never match up, but they are always within a +/- 0.5 window of each other. It would be great to compare the two sheets, to produce a list of the values which appear only in the primary sheet and not the secondary. Im trying to get this to link up to a userform, where the user select the primary sheet (A) and the secondary sheet (B), selects the tolerance, and produce the results sheet (see attached).
View 8 Replies
View Related
Jul 18, 2013
for example i have two work books where i need to compare the times, such as i need to see where does 10:26 am lies and after comparing it on workbook2 we need to return the data in a,b,c blocks infornt of 10:26am, i have tried IF(AND()) but i was not able to rationalise it for huge and random data.
Workbook1:
7/13/2013 10:26
7/13/2013 10:58
7/13/2013 12:06
7/13/2013 12:17
7/13/2013 12:29
7/13/2013 12:29
7/13/2013 12:37
7/13/2013 13:21
7/13/2013 14:24
Workbook2:
9:58:27abcassigned
11:45:09abcreleased
11:49:00ghiassigned
15:14:40ghireleased
15:25:57mnoassigned
Outout should be:
7/13/2013 10:26 a bc
7/13/2013 10:58 a bc
7/13/2013 12:06g hi
7/13/2013 12:17g hi
7/13/2013 12:29g hi
7/13/2013 12:29g h i
7/13/2013 12:37ghi
7/13/2013 13:21ghi
7/13/2013 14:24ghi
View 2 Replies
View Related
Apr 9, 2014
creating a macro that would compare two worksheets and their differences would be copied into a third worksheet in the same workbook? Several key criteria is needed:
1) The third worksheet would need to note only the data from the 1st and 2nd worksheets (including headers) that had differences. An additional column would do the difference calculations for the data whereby numeric values are subtracted (worksheet 2 from worksheet 1 values) and non-numeric values would note "Pass" or "Fail".
2) All data values that had differences would be formatted in yellow shading on the third worksheet.
3) The unique ids from column A in worksheet 1 would have to have be noted in column A of the third worksheet; even if they didn't have a difference from worksheet 2.
4) The third worksheet would need to note all of the columns noted in worksheet 1 and include the difference column for each unique column.
5) Flexibility in code to allow for addition of new columns to analysis.
see attached sample spreadsheet whereby Worksheet 1 = "dv file", Worksheet 2 = "price file" and Worksheet 3 = "Error" for purposes of this discussion.
View 9 Replies
View Related
Nov 20, 2008
I am a newbie and need your expert help please.
I have two email lists. For example they are:
List 1:
a@spam.com
b@spam.com
c@spam.com
List 2:
abcdef@spam.com
b@spam.com
c@spam.com
In list 1 the non-matching address is a@spam.com. namely it is not common to both lists. I want to automatically go through the lists and output firstly a new list of the non-matches from column 1 and also a new list of the non-common items from list two.
So in this case the result would be that somewhere there is a new list from list 1 that has "a@spam.com" and secondly there is a new list from list 2 that has "abcdef@spam.com."
Obvioulsy the real list is more complicated and longer but the principle will be the same.
View 10 Replies
View Related
Apr 17, 2013
I have two lists that I have compare to compare.
Expected result: Mark items matched in next to them, output unmatched items in column "J"
I started the code below. It properly marks the correct items, but I have trouble outputting them in Column "J"
Sub BNKREC()
Counter = 0
For i = 3 To 9
For J = 3 To 6
If Cells(i, "B").Value = Cells(J, "F").Value And Cells(i, "C").Value = Cells(J, "G").Value Then
[Code] .....
List 1:
Date Check# Amount
03/02/2013 100 $1,000.00
03/03/2013 101 $1,045.25
03/05/2013 102 $280.56
03/06/2013 103 $456.31
03/08/2013 104 $250.55
03/15/2013 105 $2,456.12
03/25/2013 106 $844.76
List 2:
Date Check# Amount
03/02/2013 100 $1,000.00
03/05/2013 102 $280.56
03/08/2013 104 $250.55
03/25/2013 106 $844.76
Expected result:
Un-Matched List:
03/03/2013 101 $1,045.25
03/06/2013 103 $456.31
03/15/2013 105 $2,456.12
View 5 Replies
View Related
Feb 19, 2009
I need a macro to compare the values in column b across 2 sheets and output the rows that do not have duplicate values in column b to a third sheet?
View 3 Replies
View Related
Mar 31, 2007
I have column A and column B:
I will be inputting data into column B.
I need excel to check to see if the data I input into column B is an exact match to the data in column A.
If it is an exact match, then column B will remain blank.
If the data in column B is different, I need column B to show the following:
No match: <data>
Example I input in column B the following:
Column A Column B
1. Car Car
2. 4357 9999
3. fsd34d 4erd
4. 98dkf 98dkf
Spreadsheet should show:
Column A Column B
1. Car
2. 4357 No match: 9999
3. fsd34d No match: 4erd
4. 98dkf
(Cell 1 and 4 in column B are empty because they are exact matches to Column A cell 1 and 4)
My questions:
1) How does the excel formula need to be written for this to work?
2) Is there a way to set it so that when I do a mass copy to data into column B that the formula will not be overwritten and it will still check to see if the data I copy and pasted into that column matches the data next to it in column A?
View 14 Replies
View Related
Feb 6, 2013
I have a worksheet with five columns (A, B, C, D and E)
The cells in Column B contain letters and/or numbers (without spaces) in no particular order.
The cells in Column C contain letters and/or numbers (without spaces) in no particular order.
I want to compare all characters in 1st Cell of Column B with all characters in 1st Cell of Column C, and display the matching characters in 1st Cell of Column D, and the character count of 1st Cell in Column D must be displayed in 1st Cell of Column E. note that multiple instances of the same character must not be treated as duplicates. When execution on 1st Row is finished then repeat procedure for Row 2, etc... Stop execution when first empty cell in Column B is located.
Example:
B1 = LJLM12
C1 = KY2MLK
B2 = ZCG4GM
C2 = X4GGGC
B3 = KTCBNG
C3 = GNBTBB
The script/code/formula must output the following:
D1 = LM2
E1 = 3
D2 = CG4G
E2 = 4
D3 = TBNG
E3 = 4
I am using Excel 2003. Y
View 2 Replies
View Related
Feb 4, 2013
I'm trying to compile a VBA that would allow me to compare 2 columns "A" in different worksheets (same Workbook) and output any unique values to 3rd worksheet together with the rest of the values in the corresponding row.
Sheet1
A
B
C
[Code]....
Excel 2010
View 9 Replies
View Related
Jun 25, 2007
is it possible to fix remainder for notes in excel sheet.
View 13 Replies
View Related
Jul 17, 2012
I want to count the smallest numbers in a range of 10 cells after omitting the 4 largest. I have been using the formula
=SUM(IF(ISNUMBER(LARGE(E5:N5,{1,2,3,4})),LARGE(E5:N5,{1,2,3,4})),D5),
This works perfectly in that in the desired cell it enters the 4 largest numbers and a specified cell. I then want to be able to total the remainder.
View 9 Replies
View Related
Feb 28, 2014
I have some 82,875 rows of data in column A is a string, in column B is a timestamp sorted in order.
I would like to run a macro that counts the first 80 of the same timestamp and highlights the remainder, doing this for every timestamp.
The timestamp is in the following format; Feb 16 15:33:02 +0000 2014
So for example you would take the first 80 with this timestamp and highlight the rest with that timestamp, and do the same for all other unique timestamps.
View 2 Replies
View Related
May 2, 2006
I have a list of stock codes which are 6 digits long and there are over 550 of them.
We have shortened our codes to a five digit number, removing the first digit.
Is there a way to delete the first digit of the numeric and replace it with the remainder in all of the 550+ cells?
View 9 Replies
View Related
Apr 27, 2007
I have one hundred rows of data and within that there are some records which are the same and they will always be in pairs - identifiable by a cell with the same ref common to both records. how to strip out the records that are not part of a pair? I would like remove all of the non pairs and move them to another sheet.
View 2 Replies
View Related
Mar 25, 2008
I want to compare and output the differences in text in 2 cells.
ie. Cell A1 has a long string of text as does Cell A2 but slightly different, I want to see exactly what the differences are.
Is there a formula I can use?
View 10 Replies
View Related
Mar 25, 2014
As per title, I am trying to compare a column of text cells which contain "Yes" or are empty and a columns of numbers. If they are "Yes" and "1" on the same row, I want to output an "OK" message. Excel seems happy with the following code but it does not work and returns an empty cell if the two conditions are true.
[Code] .....
View 6 Replies
View Related
May 19, 2008
I am trying to get the information that I have plotted, on a scatted graph,
off onto the second sheet an splitting the information. I'm not too sure if
this is the right place for this thread, but I am hoping that someone can
help?
The original data that is on the graph is in 3 columns. One has the company
name, one is the current value and one is the predicted value.
I need this info to come off the graph or from the original data in 2
fields. Customer and predicted value, but they need to be prioritized.
1 needs to be the one with the lowest current and highest potential.
2 needs to be the 2nd lowest current and 2nd highest potential......so on.
Then I need to get the highest current and highest potential.......so on.
I know that what I require is quite complex and it may have to be via
calculations, but I am hoping that excel can do this?
View 13 Replies
View Related
May 9, 2014
in column A i have fruit words (e.g. apple, banana, orange...)
in column B i have cities (e.g. london, paris, rome...)
i would like a formula in column C that gives "british apples" when "apple" and "london" are on the same row
whilst also giving "french bananas" when "paris" and "banana" are on the same row.
View 10 Replies
View Related
Jan 27, 2007
> When the workbook is opened I want a box to appear with a message and 4 choices (as buttons?).
> Based on the button clicked I want 1 of 4 new boxes to appear (replacing the first box) and ask for input values.
>I then want the inputs to be written to specific cells on a specified worksheets inside the workbook.
View 2 Replies
View Related
Oct 28, 2013
I have a long chain of formulas calculating the return on a particular investment in equipment. We'll call the inputs A, B, and C, and the output (total savings generated) Z. There are several set combinations of values for A, B, and C that I'm interested in generating a summary report for.
There are a number of steps in-between the inputs that I'm interested in, all of which are necessary to get to the output, but is there a good way to have excel chart inputs and outputs without filling out the intervening data?
I suppose the whole thing is essentially a multi-variable, multi-step data table.
View 3 Replies
View Related
Jan 28, 2014
I have a cell in sheet1 (say, B2) in which I can key a date. Once I change that date, cell C10 updates (after I hit F9 to recalculate) with a new number based on the new date.
I have a list of dates on another sheet, from 1/1/2009 to 12/31/2013, all in column B. I want to produce VBA code that will run through each day, 1/1/2009 to 12/31/2009, in sheet1 cell B2 and take the output in C10 and place it next to each day in column B until it reaches the end (12/31/2013). I know this is possible but for some reason am having trouble coming up with the right looping mechanism.
You can imagine if I had to manually key in each day to get the desired output how tedious that would be.
View 3 Replies
View Related
Aug 6, 2013
I have two sets of data to compare. One is real world data, the other is forecasted data. I have real daily data for every day over about 3 months. The predictions though, there may be 4-6 predictions for ever one real daily value.
What I'd like to do is have a function that looks at Column A's date (real daily value) and Column C's date (predicted data) and if Column C equals Column A, then divide corresponding data in Column B by value in Column D.
View 2 Replies
View Related
Feb 18, 2014
I have data from (row 1, column 1) to (row 53, column 5) on 283 consecutive worksheets in a singular excel file that I would like to be presented on a singular worksheet starting from the data on worksheet 1 and descending to the data on worksheet 283.
I am looking for a copy and paste loop solution that will copy the data from each page and sequentially paste the results on a singular output page in descending order (worksheet 1 data, worksheet 2 data... etc) so that I can sort the data.
View 1 Replies
View Related
Feb 18, 2010
In the attached excel file I have two macros that create hyperlinks:
1. BalloonToNumber - Creates hyperlinks from "Oval" shapes on sheet "Op60_1" to sheet1 (column D).
2. NumberToBalloon - Creates hyperlink scheme from sheet1 (column D) to sheet "Op60_1" "Oval" shapes.
In Q #1 my macro seems to skip some shapes on sheet "OP60_1" and I simply can not figure out why.
In Q #2 my macro creates hyperlinks to shapes that do not exist and hyperlinks to numbers that are not a "100%" match, IE: 182 and 82 would share the same hyperlink?
If you open the workbook and use the hyperlinks on sheet1 they will take you to sheet "Op60_1" and shape hyperlinks from sheet "Op60_1" take you to sheet1. On sheet "Op60_1" there are some red arrows indicating the shapes that get skipped when running the "BalloonToNumber" macro.
Shape color changes as the hyperlinks are selected from sheet1.....
View 8 Replies
View Related
Aug 24, 2012
So I have a sheet with 600 or so rows of data on a sheet called "Agent_Summary". On another sheet in the same workbook I have a list 20 peoples names. I am trying to find a way to look at the 600 or so lines on the Agent_Summary in column A and see if the name in that cell matches any of the 20 names from the "Team" Sheet. If the name on Agent_Summary is not found on the "Team" sheet then it clears the contents of that cell and moves on. Then it comes back and Deletes the blank rows. I can make it look for any 1 of the 20 names and the code works fine. How do I turn it into something that will look for any of the 20 names?
Here is my code to look for 1 of the 20 names that works great.
Code:
Sub Clean_up_Agent_Summary()
Dim Cell As Range
Dim R As Long
Dim RE As Object
Dim Rng As Range
Set Rng = Worksheets("Agent_Summary").Range("A5:A600")
Set RE = CreateObject("VBScript.RegExp")
[Code]...
"Worksheets("Team").Range("A5")" is where my 1 name is and the rest are just below that. I am thinking some kind of an Array but I am stuck on getting that set up and working right.
View 6 Replies
View Related
Jul 5, 2007
i've put this previously on here with no results. There is a formula already in there though does not work because what I want to achieve is to have Column A & Column C to Match Column E & Column F, to Return the Value YES or NO. I’ve Highlighted in ROW 947 one that should Say NO yet Says YES.
View 3 Replies
View Related
Aug 7, 2013
I have two cells which contain text, and I'd like to use IF function to compare between them. Something like: =(IF(A1=B1),"TRUE",FALSE"). But it seems like the function cannot do it with text..
View 3 Replies
View Related