Assign Text In Data Validation?
Nov 17, 2013Is it possible to assign text using data validation?
Right now, the three cells I'm using for data validation contain text, but return a number to the linked cell.
Is it possible to assign text using data validation?
Right now, the three cells I'm using for data validation contain text, but return a number to the linked cell.
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.
I have a validation drop down menu with the 12 months in it on Sheet 1. User picks the current month from the drop down list. I have 12 macros in the workbook, one for each month. Based on what month the user selects from the drop down, I would like to run a specific macro. The macro hides specific columns on sheet 2 of the workbook.
for example...user picks May from drop down which triggers macro MAY to run. If user picks Jun next month, macro JUN will run.
fyi...I'm using Excel 2010.
I am having two problems ....
1) I have a field for which the user MUST enter text information. It can't be left empty. I set validation on the cell ... Text Length must be greater than 0. It still allows the user to hit enter without entering information without an error message and a retry.
2) In another field, the user has the option to enter (text) info or not. It can be left blank. The value in this cell, empty or other, is copied to another cell in another worksheet. The problem is ... the destination cell gets a value of 0 when the user field is left blank. The value of 0 in the destination cell can't be there ... I need that cell empty.
Is it possible to force a cell entry (using Data Validation) to either a whole number or a value? In other words, I would like the data in a cell to be either a whole number between 10,000 and 20,000 or "N/A". I can do it with VBA, but Data Validation (if it's possible) would be better.
View 2 Replies View Relatedi need some formula to data validation with this criteria :
allow only text "DROP" and "check" ...
Can data validation be used to enter a text message if no numeric value is entered in the cell?
I want to force the cell to have to be populated with a number and if not show "--".
to validate a cell for the following customer format, but cant get it to work:
XX00000
Where XX is any combination of letters (upper or lowercase) and
00000 is a combination of any 5 numbers.
It must always be in this format, with this number of digits in total (2 letters followed by 5 numbers)
Is it possible to validate a string with both numbers and text with a formula using data validation? (I don't want to use a User Defined Function)
in Column C, Starting in cell C2 I have a 12 character string of six numbers, four letters, and two numbers. like this:
280838ZNOV11
is it possible to use a Custom Data Validation formula to ensure the user follows this format?
I'm using Data Validation for various fields in a form and I'm trying to make it user friendly by adding Error Alert conditions and text explaining why the error has occurred. I also want the form to be translatable into other languages.
For some VBA message boxes that get displayed I can put the English text in some hidden cells and that can be translated easily by someone without access to the code. But I cannot figure out how to make the Data Validation Error Alert messages point to a cell so that they are also translatable without forcing the translator to open each Data Validation dialog.
Can anyone provide a formula to be used in data validation that will control text length (6 digits) and restrict duplicate entries. The best formula will prevent anything other that 6 digits, but question the user regarding a duplicate entry.
For example: if the user enters 123456 no problem, but if 12345 is entered, Excel validation would not allow. If the user enters 123456 again, Excel's validation window would allow but the window will pop-up and ask to confirm.
Can I limit the text length in a cell that contains a formula? You may say "Limit the text length in the input cell". That can't be done because the formula in the resultant cell takes text from two other cells in addition to the input cell. I need to limit the overall text length to, let say, 50 characters.
View 7 Replies View RelatedI 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.
I'm trying to figure a to enforce dual data validation on a single cell. That is, I need to restrict the user to entering only a decimal value, only if a particular other cell (say A2) is blank. To put it another way, if A2 is blank, the user can enter a decimal value, but if A2 is not blank, the user cannot enter anything. I can use Data Validation to enforce either the decimal restriction or the ISBLANK, but I'm not sure how to make them work together.
View 2 Replies View RelatedVBA code which can distinguish whether a cell has been edited by:
selecting an option from a data validation list (DVL)
or
manually editing the text in a cell?
The ""Show error alert after invalid data is entered"" option is unticked to allow both selection from the DVL as well as free format text entries.
The problem arises when using the code below which makes an edited cell within a range display the new value as well as the prior value(s). This works well when using the DVL but not when editing the cell.
Is there any code which can distinguish between the 2?
[Code] ....
Is there a way to have a data validation drop down menu but at the same time allowing users to enter free text as well.
View 3 Replies View RelatedI have read a lot of posts, and maybe I am way out of my leage.
I am trying to setup a spreed sheet for our fire department.
We want to create a way to track training pay. When someone attends the
training we want to just put an "x" in next to their name in the column for
that training event rather then 9.75 for example. But we also want to be able
to add up all training for that individual for the year and see what we paid
them.
The idea is we have a sheet that shows us checks of who attended and who
did not. But we also want to add up the pay associated with that x.
So:
We want column A to be member names
Column B is a training event.
We want to go down and put in an "X" for each member who attended.
Now What I want is to have that "x" be associated with a dollar value. For
example lets say that they get $10 for that training.
THe idea is that I can run a total at the end of the year for each member
for each "x" and see how much money they recieved. I.E. the "x" is a hidden
value maybe that when I add up all the "x"s for a member it will give me
total dolar value for all training they attended.
I want to assign a text to a value. e.g if i have 2, it should come up as negative.
View 9 Replies View RelatedI currently have a spreadsheet which I use to do an audit of the office stationery supplies.
There 3 columns at the focus of this question:
F - Number of items in stock
H - Stock re-ordering level
I - Order Required
I currently have an IF statement to tell me if I need to re-order any stock, by comparing the Number of items in stock against Stock Re-ordering level.
The statement is =IF(H1>=F1, "Yes","No")
This works fine under most circumstances. However, in some of the H cells, I have the text "Special" which indicates that the stock will only need re-ordering on a special occasion.
Any value I enter in F will cause the I to say "Yes".
Is there any way to make the word "Special" equivalent to 0, so I says "No"?
First challenge will be assigning point values to Words so I can them up and create averages etc
So I have 4 words I need to learn to assign point vales to, then create a formula that will count the points in a row. That will get me off and running,
So here is a very vague idea of what I mean, this would go in A5 as a example
if A1:D1= complete+2 incomplete+0 submitted+1 missing-1
so if I had a row that was:
Submitted | Submitted |Complete| Complete | Missing | 5
( 5 would be the value the formula would return 1+1+2+2-1)
I have a series of values in one worksheet across one row. The row contains "Yes" or "No" text and also some currency or other number values.
My spreadsheet looks like this (the blank shown is a cell that has no value or text):
Yes No Yes No (blank) Yes No $100 50% 5
What I'd like to do is to have a VBA code that assigns a value to each of these text and numerical values by the following criteria:
If Yes, Value = 0
If No, Value = 5
If "Blank", Value = 0
If $0 to $25, Value = 1
[Code] ........
Therefore, I want to have the outputs in another worksheet (sheet 2) and it should show the following numbers based on the criteria above:
0 5 0 5 0 0 5 4 2 1
I want to be able to "count" apples and oranges. Is there a way to record a particular text in a text formatted cell and count it. e.g. 10 cells, 3 say "apples", three say "oranges", 4 say "plums". I want excel to keep track of the three types of fruit when I change them and give me a running number of each.
View 2 Replies View RelatedI have used a textbox ( not an activeX text box) to get input from user. I want to get that value into a cell.
View 3 Replies View RelatedI have a long list of categories in the column A (seen below). To this list i want to assign keys that will support with further calculations (in a column B).
An example of such a key would be in the case of the given example "ACTION SPORTS" and "FOOTBALL". The whole list of these "keys" hast 17 elements.
It is evident that i will need some kind of a partial match. The one i have found on the internet, limittin itself just on the first or last number of characters wont work.
Would it be possible to select my "key - list" (all 17 of them). Then excel would asign a key, whenver it would find a partial match, matching the key?
Appendix:
The Data list (Column A):
ACTION SPORTS FTW
ACTION SPORTS FTW
ACTION SPORTS FTW
ACTION SPORTS FTW
ACTION SPORTS FTW
[code].....
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.
I need to count the number of times a value appears in a row and assign a number that tells which occurence of the text it is.
For example
Name Address
Jim 123 Smith Street
Jane 123 Smith Street
Bob 543 Apple Street
Mary 543 Apple Street
I would like a way to insert a column that puts a 1 next to Jim and a 2 next to Jane, a 1 next to Bob and a 2 next to Mary and so on.
Ultimately, I want to sort the list and delete all the twos, thus deleting the duplicate address entry.
I would like to know if I can do a VBA code that takes one formule that is showed as text in one cell (eg '=wood+plastic) to the next cell to really use it... I mean, that one time we define de "wood" valeu and plastic valeu will realize the calcul.
View 9 Replies View RelatedI have 2 columns First Name & Surname. What I want to do is create a data validation list on the surname which results in the 2nd data validation list only showing the first names which link to one of the surnames.
i.e. If I selected Smith in the 1st validation list then I would only like to see 'Paul' as an option in the 2nd list
First Name
Surname
Paul
Smith
Paul
Jones
Tony
Phillips
I have a worksheet (WORK1) that contains two columns of values that I can add to or change if necessary. The first column would be a text string (STRING), the second column would be its category (CATEGORY).
Example:
STRING CATEGORY
Chevron Gas
Exxon Gas
Vons Groceries
McDonalds Hamburger
In a separate workbook (WORK2), I have a column (A) which contains text. Ex:
A1 = "Station 2134 Chevron Motor"
A2 = "ExxonOil 234"
A3 = "Vons store"
A4 = "Hamburger McDonalds"
I would like to assign B1, B2, and so on... a CATEGORY if it contains STRING.
For this example, B1, B2, and so on... would be assigned the values.
B1 = "Gas"
B2 = "Gas"
B3 = "Groceries"
B4 = "Hamburger"
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.