Comparing Text Values In Two Cells And Adding 1 To Result Column

Apr 14, 2013

I have an excel file with some data in it. I have two columns with one of four words in it. For simplicity I'll call them RED, GREEN, BLUE, and Yellow. A few columns over I have columns "Same" "Good" and "Bad". I'm trying to figure out a way to get excel to put a 1 in the appropriate column, if cell A1 is Red I need excel to look at the word in cell B2 and put a 1 in the "same" column if A1 and B1 are the same word. If the word in B2 is Yellow I need excel to put a 1 in the "Good" column. If the word in B1 is GREEN or BLUE I need it to put a 1 in the bad column. The tricky part is each of the four words RED, GREEN, BLUE, and Yellow have a different set of words that will be called "good" or "bad". So if the word in cell A1 if Green for example it will have a different set of good and bad color words.

So it seems I need four different functions depending on what word is in A1. In the column next to these lists of words I have the date which I'll need to use to give me the sums of same, good, and bad for each day. But first things first. I think I need to use a combination of IF functions and MATCH function, but I can't figure out anything that works. Below is what I'm hoping it will look like when I've got the right formulas.

First column
Second column
Date
Same
Good
Bad

[Code]....

View 9 Replies


ADVERTISEMENT

Comparing Two Columns And Returning Number Of Cells In One Column With Higher Values?

Apr 8, 2014

I have two Columns C and E that have dollar amounts in them. I want to compare each row in those columns and then total the number in column C that are higher that column E.

So basically C6>E6, C7<E7, C8=E8,C9>E9 should return the result of 2. There are two instances where the price in C is higher than the price in E.

View 3 Replies View Related

Adding Text To End Of All Cells In Column

Feb 16, 2010

I have about 5000 rows of data and I need to add the same letters (.jpg) the the end of all the data in a column.

View 4 Replies View Related

Adding Up Values In Nth Cells With Text In The Cells In Between

May 22, 2009

i have a problem adding cells every 5th cell for example i have

=SUMPRODUCT((C10:C67)*(MOD(ROW(C10:C67),5)=0))

this adds every 5th row in this range and it does it right as long as there is no text in the cells in between

it works fine when it looks like this

1
1
1
1
1
1
1

but it does not work when it looks like this

1
1
text
1
1
1

when this happens it appears as #VALUE, meaning an error but i don't understand why if i'm just telling it to look at every 5th row and those specific rows have no text in them

i have a spreadsheet with text in between the cells that need to be added so i need a formula that only adds up the cells with numbers on it, to be specific the numbers are either ones or zeroes.....

View 9 Replies View Related

Wrong Result Adding Values Of Textboxes In Userform?

Jun 27, 2014

I have 4 text boxes in a user form where user type numbers. At the end i have another text box(yellow one) that adds these numbers using this code.

[Code]....

In another text box(grey one) user types another number. Then using this code

[Code] .....

I try to add the values of the two previous text boxes. I get wrong result when i use decimals numbers and i can not understand what is wrong.

Attached File : add text boxes.xlsm

View 7 Replies View Related

Comparing Values And Returning Different Column

May 31, 2007

I want to return the proper value from sheet 2 into column C in sheet one. I have the current formula set up as an array but I only get the value that matches the first row in Sheet 2.

HTML Column A Column B Column C
Date Number Who
3/23/2007 902-555-2596=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 980-123-6621=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 980-123-6621=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 980-555-6621=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 980-678-0352=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 902-555-7958=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 980-555-6621=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 980-555-6621=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 902-555-7958=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
3/23/2007 902-555-7958=IF($B2=Sheet2!$A$2:$A$2001,Sheet2!$B$2:$B$2001,)
~~~~~~~~~~~ Sheet 2 ~~~~~~~~~~~~~~~~~
Column A Column B
902-555-7958Big Bird
902-555-5100Daffy Duck
902-678-0352Elmo
902-555-5752Donald Duck
902-555-7420Bert
980-123-6621Ernie
902-555-2596Grover

View 12 Replies View Related

Macro - Comparing Values In One Column

Nov 13, 2009

I'll try my best to explain what I'm trying to do here using Excel macro (i've very limited knoledge in VBA ). I am working on a project where I'm using an actuator to measure micro-switches. The values are then extracted using HyperTerminal via RS232 and transferred to Excel to filter the values and display only the ones that are important.

Here is what I'd like to do via a Macro:

Compare cells in column A (e.g A1 and A2, A2 and A3, A3 and A4 etc.)

Example:

A
0
300
550
1200
1700
1900
2200
2000
1850

[Code]....

So first, if the values increase, do nothing and keep comparing other values. If we find the values decrease, display the larger value between the two, in this case it's the value 2200 that we want to display.

Next, the values will be decreasing progressively. We'll do the comparison between 2 values but this time if the values decrease, do nothing until we find a value increases. Display then the smaller value between the 2, here it's 1500.!

View 9 Replies View Related

Macro: Comparing Values In One Column

Nov 13, 2009

I'm trying to do here using Excel macro (i've very limited knoledge in VBA ). I am working on a project where I'm using an actuator to measure micro-switches. The values are then extracted using HyperTerminal via RS232 and transferred to Excel to filter the values and display only the ones that are important.

Here is what I'd like to do via a Macro:
Compare cells in column A (e.g A1 and A2, A2 and A3, A3 and A4 etc.)

Example:
A
0
300
550
1200
1700
1900
2200
2000
1850
1750
1600
1500
1950
2500
4000

So first, if the values increase, do nothing and keep comparing other values. If we find the values decrease, display the larger value between the two, in this case it's the value 2200 that we want to display.

Next, the values will be decreasing progressively. We'll do the comparison between 2 values but this time if the values decrease, do nothing until we find a value increases. Display then the smaller value between the 2, here it's 1500.

View 9 Replies View Related

If Statement Failing When Comparing Text Box Values On Userform

Jun 12, 2014

I am trying to compare to values that a user inputs in a user form. It's ok if they are not the same I just want the user to know it. I am only including the part where the if statement is failing:

VB:
If Me.VSLongQuant.Value <> Me.VSShortQuant.Value Then
MsgBox VerUnBal
If VerUnBal = vbNo Then
Exit Sub
End If
End If

I have VerUnBal as Long and defined as:

VB:
VerUnBal = MsgBox("The Long and Short option Qunatities are not equal." & Chr(13) & _
"Is this intended to be an unbalanced vertical spread?", vbYesNo, _
"Unbalanced Spread Alert")

I can provide more info as necessary. There are two problems 1) the message box is appearing whether the numbers are equal or not, and 2) clicking No in the message box does not cause the Sub to exit.

View 6 Replies View Related

Adding Values In Cells (stops Adding After Row 14)

Oct 1, 2009

I am trying to add numbers from cells if it IsNumeric and for some reason in column K the macro doesnt recognize numbers after row 14?

The range column is "E4:E"
Search criteria is the letter "R" in column "E" Then using OffSet, I go thru other columns and process data. Most of the macro works except for column K after row 14?

View 5 Replies View Related

Comparing Text In Cells..?

Jan 26, 2005

I have a spreadsheet that has long text sentences in each cell. I have a 2nd spreadsheet which is a slightly updated version of the first spreadsheet. The slight updates consisted of editing the odd word here or there out of the first spreadsheet.

Unfortunately, I didn't keep track of the changes I made, and I need to know what they are.

It's easy to tell if a change has been made, simply by comparing the cells. But I can't find an easy way to find out exactly what change was made. Comparing the cells a line at a time is very time consuming.

View 9 Replies View Related

Comparing Text If Some Cells Can Be Empty

Aug 13, 2009

I need to compare some cells, but sometimes one or two cells can be empty (but sometimes none of them)

e.g. A1 = January
B1 =
C1 = January
D1 = January
E1 =

and I need to compare this cells A1:E1 and if text in not empty cells is the same then write TRUE to F1 and if not write FALSE.

View 6 Replies View Related

Capture Unique Values From 1 Column And Populate The Result Into Another Column

Aug 28, 2009

I have values in COlumn A, probably about 50K rows, The total unique values on the column A is only about 27. I need to capture all those unique values and paste them in column B. I didn't want to do "Advance filtering" since the workbook has many macros's on it that the user simply click on. Im thingking of creating a loop and compare values already pasted in Column b but then that will take too much time to complete the loop. Is there any easier or yet more efficient way to accomplish this?.

View 2 Replies View Related

Comparing Values In One Column And Inserting Multiple Blank Rows

Oct 13, 2006

I am working on formatting a spreadsheet report where the values will change in column A. Here is what I would like to do via a Macro. Compare the cells in column A (e.g., compare A2 to A3, compare A3 to A4, and so on). If the values between the two cells in column A are different, insert three blank rows and set the active cell to the next cell following the blank lines. Example:

if cell A5 is different from A6, insert three blank rows below row 5 and new active cell is now A9 and the comparison would start again. I have been trying to code the macro for this but with no success. Here is the macro I have been working on.

Sub Macro1()
Const NumRow As Integer = 3
Dim StartCell As Range
Dim RowNR, NewCnt As Long
Dim RowCount As Long
Dim Count As Long
Dim intRow As Integer
Dim bFmtComplete As Boolean
RowCount = Application.WorksheetFunction.CountA _
(Range("A1", Range("A" & Rows.Count).End(xlUp)))
bFmtComplete = False
RowNR = 2
Range("A1:J1").Select
' Rows("1:1").Select
Selection.Copy................

View 4 Replies View Related

Comparing Values And Returning Info From Separate Cells

Sep 18, 2013

If I am working from cell (D16), I am looking for a formula to compare the value in 2 different cells (D8 and D12) to a value in a third cell (D14) and the one with the closest value without going over returns a seperate value from either (D7 or D11), But if both D8 and D12 are above the value of (D14) then the closest value would be the answer and return the answer from (D7 or D11).

Example: D7=Bob and D8=25
D11=John and D12= 40
D14= 45
D16 (answer cell) =John
OR:
D7=Bob and D8=46
D11=John and D12=48
D14=45
D16 (answer cell) =Bob

View 2 Replies View Related

How To Combine Text Values Of Formulas In Addition To Adding Text

Jun 15, 2013

I am trying to combine the text values of several formulas in addition to adding some text (punctuation) in between.

Here is the data that I am trying to combine

C14: 2013
C15: Period 6
C16: Week 1

In Cell C13, I would like to have this value returned: "2013 - Period 6, Week 1"

Is there such a way to do this?

View 9 Replies View Related

Formula To Display Column Header As Result When Any Value Exists In Cells Under Column

Jul 25, 2014

I am trying to write a formula where the column header of the row in which a value other than 0 exists, will display for each instance (row) where a value exists in an array spanning 3 columns. So the result cell could be any of the three column headers, or a combination thereof.

I started the formula in P2 of the GL Detail-2012 tab. File attached.

Here is what I started: =INDEX($M$1:$O$1,SUMPRODUCT(COUNTIF($M$2:$O$67756,))). Not working.

View 7 Replies View Related

Date Result From Text To Column

Aug 10, 2009

As part of a larger macro, the code below is supposed to start the separation of data into 4 columns. It doesn't work perfectly though and I have to manually inspect data and correct. The problem is that 22: 8- 3- 3 becomes 8- 3- 3 in the second column, which is what I want. However 60:12- 7-10 becomes 7/12/2010. Excel appears to recognise it as a date, when the extra number is in the second column.

View 4 Replies View Related

Formula To Get Desire Result From Values Of Two Column?

Feb 25, 2014

I have set of column data A & B In those A contains Serial No & B contains Ticket No...

I am looking for formula to solve the function by those conditions... almost get done by countifs functions.

1.If Serial & Ticket No Only Once result should be "FIRST TIME LABOUR ONLY"
2.If Repeat Twice For The First Serial No And Ticket "Labour Only", For The Second Serial No And Ticket "Labour & Parts"
3.If Serial No Twice But Ticekt No is different for both serial no Result Should be "PART USED 1 OF 2"
4.More Than 2 Times Serial & Ticket No Repeats" Result Should Be "CCI"

View 5 Replies View Related

Adding Values (currency) From One Column Based On Value Of Another Column (Categories)

Nov 5, 2013

I have a worksheet (Sheet1) that is constantly growing with information. I have several categories under the "Category" column and then the various amounts under "Amount" column. I would like to have Sheet2 be able to keep a running total of the "Amount" column for each category as it increases in entries. I've attached an example sheet.

Example.xlsx‎

View 1 Replies View Related

Excel 2010 :: Comparing Cells And Displaying Text Dependent On The Results?

Aug 15, 2012

I have attached a work book example of what i am trying to do.

Column D is what i originally did in terms of the formula and now i have to have a column display text dependant on what is in column A to C.

I was trying this formula =IF(b2>a2,"Start Target Missed",IF(c2="","Failed","Tracking")) However if this isnt working.

Is there anything i can do to change this?

View 3 Replies View Related

Comparing Customer Names In Rows And Returning Text Data In Different Cells If Same

Jan 26, 2010

I've got a list of donor names, names listed multipled times in Column A, each row with different donation data. For instance:

Sheet 1

A1 - Mary Jones, B1- Internet Donation
A2 - Mary Jones, B2 - Silent Auction Purchase
A3 - Mary Jones, B3 - Event Ticket Purchase
A4 - Gary Jones, B4 - Foundation Grant
A5 - Gary Jones, B5 - Internet Donation
A6 - Sara Parker, B6 - Event Ticket Purchase

I want Excel to compare rows A1 and A2, and if the name has not changed, enter the donation data from Column B into another sheet that will just list that person's name once:

Sheet 2

A1 - Mary Jones, B1- Donation1, C1 -Donation2, D1 - Donation3
A2 - Gary Jones, B2 - Donation1, C2 - Donation2, D1 - Donation3 (which would return no value because there the name changes

Does this involve IF, MATCH or VLOOKUP formulas?

View 9 Replies View Related

IF THEN For Text And Adding Values Associated To Those

Apr 3, 2013

I am trying to create a spread sheet where I have different columns. The columns consist of name and dollar amount. Names may occur more than once. I would like to scan the column with the names and copy the different names to another column. Once that is done, I am hoping to copy the value or sum of all values associated with that name to the column beside it. I am going to have a long list of names with different values and I would like to sort them and add up those values. I have attached an example of what I am hoping to achieve. I am hoping my 'Sum of Values' is actually summed, I left it longhand for explanation sake.

Name
Value
Name
Sum of values

x
4
x
4+2

[Code] ....

View 1 Replies View Related

Delete Row Of Duplicate Column Cells By Comparing 2 Columns Across 2 Worksheets

Mar 14, 2008

I am looking for a macro to look in Sheet 1 column A and compare the values to Sheet 2 column O. When it finds a duplicate I want it to delete the entire row in sheet 1. I dont want to have to manually sort anything if that's possible.

View 3 Replies View Related

Adding Values From One Column Based On Criteria In Another Column?

Jan 30, 2013

If i have the following layout of data

Column 1 Column 2
January 1000
January 1234
February 1300
March 1600
January 15
March 123
April 234
January 3000

I would like a formula that adds all the January numbers together returning a result of 5249

To move this one step further i would eventually need to add these numbers based on quarters, for example if the value is January February or March in column 1 then add the numbers in column 2.

I'm sure i have done this before using a countifs maybe but my mind has drawn a blank

View 1 Replies View Related

CountIf Adding Up Text Values

May 10, 2013

I have names in A1, A2, A3 and A4 and in cells B1:C4 I have atendance for am and pm.What I need is it to count if someone was in on a day. So if B1 or C1 or both contains "in" then the subtotal will be 1 and added for each row, so it shows how many are in whether it be for 1/2 or a full day

View 2 Replies View Related

Adding Text To The Start And End Of A Cells Text In Another Cell?

Nov 28, 2013

I have some text I wish to add some content to the front and back of it. i.e. the text in the cell is "214.212.134.62" and I want to add "http://" to the front of it and ":9999" to the back to it, so it looks like "http://214.212.134.62:9999" in a different cell.

View 3 Replies View Related

Comparing Then Adding

Sep 14, 2008

say i have 4 columns of 5 values each consisting of 0's and 1's.

...a b c d
v 0 1 1 1
w 1 0 0 1
x 1 1 1 1
y 0 0 1 0
z 1 1 0 0


how would i write a function that would compare each value under column 'a' to each value under column 'b' and then return a value of 1 if they are equal, and return a value of 0 if they are not equal, then add up the return values.

(comparing column 'a' with 'b' you would get a result of 3.) then have the function continue on to compare column 'a' with column 'c'..'d; comparing column 'b'..'d', etc

so in long form: IF(av=bv,1,0) = 0
IF(aw=bw,1,0) = 0
IF(ax=bx,1,0) = 1
IF(ay=by,1,0) = 1
IF(az=bz,1,0) = 1

SUM(IFs) = 3

View 13 Replies View Related

If Certain Text Typed Into Each Of Two Cells - Result Will Appear In Third Cell

Jan 16, 2014

I have a worksheet and in two of the cells I have text. In another cell I want to put a formula in so that if certain text is typed into each of the two cells a result will appear in the third cell.

Hazardous
Smiths
60%

Non Hazardous
Smiths
20%

Hazardous
Browns
45%

Can I put a formula in and if so, what formula would it be?

View 5 Replies View Related

Adding Column Values.

Dec 17, 2008

This is a simple one, for someone who is smarter than I. I need to add a column but omit the rows that are blank or has a zero value in either row C or D. In other words I want to add every row in column C if there is a value in row C&D of that item. Attached is a small example.

View 2 Replies View Related







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