Assign Numerical Values To Text To Allow Calculations
Jan 31, 2010
I am working up a workbook template that will be used to process survey results. The way I ultimatley want it to work is that the user can paste data from another application into a worksheet in Excel, and then view analysed results on a second sheet (which are processed via formulae on a third, hidden sheet).
The problem I have is this: the data from the program that's capturing them are text values. For example, column B contains answers to a question where participants rate an experience, and the values are either "Excellent", "Good", "Fair", "Poor", "Awful". I want these to be converted to numerical values, on a scale where "Excellent" = 5 and "Awful" = 1, so that I can then average these.
So, the question is: Can I somehow tell Excel that "Excellent" = 5 and "Good" = 4 etc, and then use AVERAGE(B:B) on the text data and get a number back?
I did think of having an intermediate sheet that used VLOOKUP to create a copy of the first sheet (where the user pastes the text data) with the text replaced by numbers. But, because I don't know in advance how many rows will contain data (i.e. how many survey results there will be), I have to assume on the high side and copy down 50,000 rows. But, this takes ages to calculate.
View 9 Replies
ADVERTISEMENT
Dec 17, 2007
I have a formula that counts all instances of the letters a, b and c in a range and assigns them a value of 1 unless they are in the M column in which case a, b or c counts 4.
=SUM(COUNTIF(J2:AB2,{"a*","b","c"}),OR(LEFT(M2)={"a","b","c"})*4)
This worked well but now I need to modify the weightings across this range. My new goal is to count all instances of a,b and c in the range J2:AB2 but have M column a,b, c's = 2 and N:R column a,b,c's equalling 4. Letters other than a,b or c count as 0.
Example:
J2...K2...L2...M2...N2...O2...P2...Q2...R2...
A....B.....B.....C.....B.....D....B.....C.....E
the output of the above sequence should be
1+1+1+2+4+4+0+4+4+0 = 21
View 4 Replies
View Related
Feb 27, 2008
My company is soon to be rolling out a new payment system, and I'd like to be able to track commission for everything I sell. Briefly, we get paid via a percentage of the company's gross profit, and the way in which the company gets paid is tiered. (the cellphone business)
So, If a customer activates a plan thats below $39.99, we get paid X amount. If it's below $59.99 we get paid Y amount, and so on and so forth, there are multiple different tiers.
What I want to do is set up a list via data validation so that I can pick what plan they have (via the name of the plan) and have it return a numerical value (ie $39.99) and also have the ability to pick text messaging, etc as options so that the workbook will add the monthly rates (39.99 + 14.95) and then have it return value for the right priceplan tier.
If this is confusing, I apologize for not being more clear, but attached is an example. The top one is what I'm actually trying to code, but the bottom is completely filled in, so you can get a more clear sense of what I'm trying to do. Honestly I'm not even sure if it can be done.
View 2 Replies
View Related
Feb 28, 2010
I have a list of grades they are 3a, 3b, 3c, 4a, 4b, 4c, etc up to 7a. An a is one grade than a b, and a b is one grade higher than a c. In one test a student may score a 4b and in another a 4a. I need a way to calculate the difference in "grades" e.g if a student scores a 4a in test 1 and a 5c in test 2 the difference is 1.
Is there a way I can do this using custom formatting or will I have to assign values to the grades and insert extra columns to do the calculations. I need the simpliest way as I have to disseminate to my staff in my department.
View 9 Replies
View Related
Apr 25, 2013
I have a list of names and prices as shown in two columns as a master list:
Apple and Lime 3,5
Assam 2,5
Chamomile Flowers 2,5
Chamomile Lemongrass3,5
Chilli mint 3,5
(the list is a lot longer than this!)
I have created a pick list using data validation to pick any of the names to insert elsewhere in the spread sheet. How can i get the next cell adjacent to this name to search and input the corresponding price?
View 8 Replies
View Related
Jul 9, 2006
Is it possible once you have assigned text a numerical value (example: Adam = 12) to add them together? (example: adam =12 and bob = 8, therefore adam + bob = 20)
View 9 Replies
View Related
Sep 28, 2008
I am working on a vendor scorecard, and can not determine how to assign numerical values from 1 through 5. I am basically needing a way for the value to be added into a sum when the box is selected.
View 9 Replies
View Related
Nov 21, 2008
Hi all, first post here.
I've been asked to do something in excel i can't seem to get my head around.
My client provides me with data in the form
1c, 1b, 1a, 2c, 2b, 2a, 3c etc... where 1a is the lowest.
I need to find a way of working out the difference between these, e.g.
edit: 2a - 1c = 5
I've been working on it and have made some headway by splitting these with MID function and then using CODE to try and work out a unique ID for each, but i can't help feeling there's an easier way!
View 9 Replies
View Related
Apr 30, 2014
I am quite inexperienced with Excel and I am struggling to understand how should I set up a formula, within the data validation function to achieve the following:
I need to restrict a certain set of cells, for people to be able to input only the following values: "1", "0.5", "A", "H", "0.5A" (or 0.5a), "0.5H" (or 0.5h)
And I would need the data validation tool not to include blank cells.
View 1 Replies
View Related
Sep 15, 2008
I have an issue with some excel spread sheet I am working on.
I am using Macros, Buttons to assign values to a text box.
When I do not protect the worksheet no problems.
When I include my calculation sub into my Worksheet Change module.
It sort of works but flashes a lot, and takes about 6 or more seconds.
When I dont include it in the Worksheet change module it doesn't flash and seems to work fine.
When I protect the work sheet, in my code I unprotect it and try to run my code, but it wont go through. I get an error.
Run-Time error '1004': Application-defined or object-defined error
Worksheet Module
Option Explicit ' Force the declarations of all variables in this module
Private Sub Worksheet_Change(ByVal Target As Range)
'Unprotect
'Call Calculate_Decision
If Range("MoreBorrowers") = "Yes" Then
Rows("21:27").Hidden = False
Else
Rows("21:27").Hidden = True
End If
If Range("GuaranteeYN") = "Yes" Then
Rows("159:167").Hidden = False
Else
Rows("159:167").Hidden = True
End If
I have tried adding in the Me. before my Range but nothing seems to work.
View 9 Replies
View Related
Aug 28, 2009
Here's my situation.
I will post a rudimentary example:
Account Name/Column A
Truman school, San Diego
Truman school, San Diego
Truman school, San francisco
Truman school, Atlanta
Truman school, Atlanta
In column B, I would like it to assign a unique numeric id based on the TEXT only.
So Truman school, San Diego gets a string of numbers: 1234
Truman school, san fran: 1235
Truman school, Atlanta: 1236
My spreadsheet is about 6,000 records with a great deal of the above situation going on. So school names are identical with different locations assigned. I am trying to import to a database and don't want a lot of duplicate records. That's why I'm trying to assign a numeric value.
View 4 Replies
View Related
Jul 25, 2009
creating functions in excel and would like to hire someone who can assist me in creating the following functions: Column A (For Numerical Values Less Than or = to 100): Column B Value should be (+10)
Example 1: If a numerical value of 90 is placed in Column A then Column B Numerical Auto Value should be 80+10 (190). Example 2: If a numerical value of 35 is placed in column A then Column B Numerical Auto Value should be 35+10 (45) and so on. Another important point is that if the values in column A are copy and pasted Column B should automatically discharge the values visibly as the examples stated above is this possible? If not i'll need to have this done.
Also there are other numerical values that must be added in Column A (basically for every increase in numerical value of 100 there are to be different numerical plus factors in accordance to Column A). Column A (For Numerical Values greater than 100 but less than 200): Column B Value should be (+15).......
View 4 Replies
View Related
Jan 25, 2010
I want to set up an if statement that does the following, where 'a' and 'b' are numerical values.
If 'a' is not a multiple of 'b' Then
...
Else
...
End If
How can I write this so VBA can understand it?
View 2 Replies
View Related
Apr 6, 2006
I've got a series of values in a column as follows:
10 Mb
10 Mb
1000 Mb
1000 Mb
114 Mb
128 Mb
128 Mb
Obviously 1000 mb is more than 10 mb, but it sorts as second in the list
because it starts with a "1". How do I tell Excel to sort by the entire
numerical value instead of the first number?
View 9 Replies
View Related
May 11, 2009
it seems that excel is deciding what type of array this is by evaluating the type of the first cell in each column and applying this type to the rest of the array's column. Problem is that i want all values to be brought in, text and numerical.
Dim VArray As Variant
Sub DA201()
If FileThere(Path & "DA201.xls") Then
GetDataTowers Path & "DA201.XLS", "", "DataRange", Sheets _("Towers").Range("CStart"), False, False
Else
MsgBox ("File DA201.xls not found. Click OK to continue")
End If
End Sub
Public Sub GetDataTowers(SourceFile As Variant, SourceSheet As String, SourceRange As String, TargetRange As Range, Header As Boolean, UseHeaderRow As Boolean)
Dim rsCon As Object
Dim rsData As Object
Dim szConnect As String
Dim szSQL As String
Dim n As Integer
Dim row, m As Integer
If Val(Application.Version) < 12 Then
szConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & SourceFile & ";" & _
"Extended Properties=""Excel 8.0;HDR=No"";"
Else....................................
View 9 Replies
View Related
Oct 25, 2013
I'm trying to streamline my spreadsheet a bit. Sometime last year I managed to use the formula found (on the attached file) in cell K4 to assign a numerical value to a lettered grade. However, it's been a year or so since I thought about it and so I've completely forgotten how to edit it to make it more appropriate for this spreadsheet!
Essentially what I'm trying to do is a workaround for what I've already done in columns E and F: I'm trying to show the difference between two grades (letters) as a numerical value. Is there a way to do this, or is the VLOOKUP work around I've used in columns E and F going to be the simplest way?
View 1 Replies
View Related
Jan 20, 2009
Basically what I am trying to do is build a formula but I have hit a wall it seems like.
what I want to do to complete the formula is, I have 2 names in mind that I want to be able to enter one cell and have excel translate them into a number. So for example if I enter the name John in that cell excel will know that John means the number 3 and then tomorrow I erase John from that cell and enter Jim and excel will know that Jim means the number 2.
But again I want to be able to enter a certain body of txt into one cell and have excel recognize it as a number. How can this be done?
I have Excel 2003 and 2007
View 10 Replies
View Related
Jan 1, 2009
I have a range, A1:A10 that I want to sum, min, and max. I want to ignore any text or #DIV/0! values in this range. I know how write the formulas except how to ignore the text and cell errors. Can someone steer me in the right direction?
View 5 Replies
View Related
May 29, 2009
I need to convert levels to numerical values and then: Firstly, add together two vlookup values THEN divide by 2 to get an average AND THEN see if this average AND a second, individual lookup value are above a specified another value, which may be different. IF all these criteria are set, return, "yes" if either the first or second, or both criteria are not met then "no"
Or put it another way. if lookup values A+B/2>"5" AND C>"3" then "yes", Else "no"
Lookup chart:
P11
P22
P33
P44
P55
P66
1c7
1b9
1a11...............
View 3 Replies
View Related
Mar 9, 2013
I'm making a spreadsheet for the homes I'm looking at purchasing and wanted a way to calculate automatically which one has the most things we're looking for.
So for example, if a home has a walk in closet, it would say "yes". If it doesn't it obviously would say "no".
Is there a way to assign a number value in a totals column where "yes"=1 and "no"=2?
Or a way to make colors equal a certain value?
Where I'd make all the "yes" items green and then a green cell = 1, a yellow cell = 2, and a red cell = 3.
View 5 Replies
View Related
Feb 27, 2012
I am trying to conditionally sum numbers from a matrix. On the vertical axis, there will be duplicate values (text) who's rows should be summed, and on the horizontal axis I need to sum in between two numbers that will be in sequential order (such as dates). The real tough part for me is that the data field that I will be summing from has non numerical values, like dashes. Obviously, I don't want to sum the dashes, but it throws off any formulas I have tried (like sum arrays).
My hopes are to use as little memory as possible so my file size wont get too big and to not have to use macros (I do not really use them), although I am willing to try if they are basic.
In the example below, I want to sum rows for the letter "A" and in between numbers "2" and "4."
# 1 2 3 4 5
A2 6 5 4 2
B4 5 6 4 1
C-----
A4 2 1 2 1
E1 1 2 2 2
Y Variable: A
X Variable Min: 2
X Variable Max: 4
Correct Result = 20.00 = (6+5+4+2+1+2)
View 3 Replies
View Related
Mar 19, 2013
I often have to OCR files in Adobe and then copy the data as a table into Excel. Sometimes when I move the data over these little boxes with question marks inside will appear infront of the data in the cells. I can delete the square from the spell by just backspacing after it but I don't want to have to do that for hundreds of cells individually. Googling around I found a formula: =RIGHT(A1, LEN(A1)-1)
That formula will get rid of the box, once the box is removed I need to be able SUM the values, but I am still unable to. I've tried to copy and paste the values before using the SUM function but that does not work, I've also tried to SUM before removing the box but that does not work either. I've found that if I double click in the cells after using the formula that it will allow me to use the SUM function but that would require me to double click hundreds of cells individually. Also, just in case this matters, a little green flag appears in the upper left corner of the affected cells after I use the previously mentioned formula.
View 4 Replies
View Related
Jul 7, 2013
I'm attempting to assign 1 of 4 predetermined values to a cell based on the values of entries in another cell.
View the example attached : Value assignmts.xls
Assign the Value of 1, to (D8) when any value entered in (C9) is equal to or over 380, but less than 410.
Assign the Value of 2, to (D8) when any value entered in (C9) is equal to or over 410, but less than 440.
Assign the Value of 3, to (D8) when any value entered in (C9) is equal to or over 440, but less than 470.
Assign the Value of 0, to (D8) when any value entered in (C9) less than 380.
View 9 Replies
View Related
Oct 13, 2008
I have a monster of a sheet going and am working for research purposes. I dislike the interface of SPSS so I use excel to boil down my variables to a smaller state, to which it then goes back to SPSS for the hardcore analysis. Unfortunately, this study has values of "N/A", "Missing", and "." (not entered), so it makes it a bit tricky for me. Say I want to check 10 different scales to see if any are true: =IF(OR(FJ6>=1,ZD6>=1,....etc),"Yes","No"))
Problem is the blasted program is reading ".", "Missing", and "N/A" as greater than one!!!!! I've found a way around by making monster formulas that first check that the field is not equal to those three text values, but there must be a faster way! To see what I mean, put a period in one cell (like A1) and write =IF(A1>=1,"Yes","No") and you'll see it returns a Yes.
View 4 Replies
View Related
Apr 21, 2013
I am a teacher and need a column of student names (which will all be different) but also need to assign them a numerical value of 1 to analyze my data. How can I do this?
View 3 Replies
View Related
Jun 16, 2007
I need a formula that looks at a Cell and if it contains any text at all it will return a numerical value into a seperate cell. I have done this before but for some annoying reason i cant remember how i did it.
View 4 Replies
View Related
May 14, 2008
I am trying to sort different SKU #'s for my amazon store on excel. I go to Data... Sort... Ascending and it comes out like this...
UP1
UP10
UP100
UP101
UP102
UP103
UP104
and so on...
i want it to be like this
UP1
UP2
UP3
UP4
UP5
View 3 Replies
View Related
Feb 5, 2014
I am attempting to count from a spreadsheet the reference number of a customer (numbers and text) based on two criteria.
1, If column G= Requested
2, Column I = Meeting
Count Row E
I thought a sumproduct was best and have started using it for the first time, I thought this should work but I keep getting a #NUM! error.
I have tried with numbers and it works but the non numeric aspect is difficult.
[Code].....
View 14 Replies
View Related
Oct 16, 2008
I am trying to do is a summary of numerical values, based on several conditions.
column a column b column c
local loop live cross connect
loop A cancel 100
long haul live 10000
long haul pend canc 1000
loop Z live 100
x-conn live cross connect
In column a, i have several choices and i want to focus on those choices that fall into column B "live" or "pend canc" and then only have numerical data in column C
I've tried several different formulas like
=SUMPRODUCT((a30:a38="Loop A")*(a30:a38="Long Haul")+(b30:b38="Live"),cX30:cX38)
I know the result of this should be 111000 but it's not working...I usually get n/a. I know about using cntl-shift-enter to use the formula properly.
I can get one variable to sum up properly using =SUMIF(M9:M21,"Live",BW9:BW21)
but, that leaves out anything that is pend-canc
I have also tried =SUM(IF((a9:a21="long haul")*(b9:b21="live"),cX9:cX21)) which gives back a value that is accurate.....
View 8 Replies
View Related
Aug 28, 2009
I have the following 'numerical values'
2510000.011
3010000.011
3510000.011.3
2518000.032.5
3018000.043
3518000.043.7
2530000.125.5
3030000.145.8
3530000.176.2
With the first two values as criterias, I need to find the 3rd and 4th value
Example: If I have the criteria as 30 and 1800 , I should get the result as 0.04and 3
View 10 Replies
View Related