Skip to main content
Filter by
Sorted by
Tagged with
0 votes
3 answers
137 views

I'm working on a Windows application in VB.Net where the user has to enter phone numbers, which are validated to contain only numbers, using the IsNumeric function. One of the things that I check is: ...
StarWeaver's user avatar
0 votes
0 answers
48 views

I have this procedure to check the input of a cell (and it is working as expected): ' Check for validation in column P If Not Intersect(Target, Me.Columns("P")) Is Nothing Then ' Loop ...
DutchArjo's user avatar
  • 359
0 votes
1 answer
73 views

Dears, Iam trying to create a Data validation in VBA. Imagine I have a range of cells A1:A10 and I want a MsgBox to pop up if user enter text in one of the cells. Iam trying below but does not work. ...
user23304229's user avatar
0 votes
1 answer
260 views

Hey I have encounter a problem writing my if-else function using .isnumeric(). in the following I wanted a different outcome depending on if the input is a number in the range of 4 or the letter w ...
AverageEarl's user avatar
0 votes
1 answer
2k views

I am currently creating a program which will ask the user to enter a year and then states whether it is a leap year or not by seeing if the year is divisible by 4. It also has a type check, presence ...
Azalea-Delphinium's user avatar
0 votes
1 answer
109 views

I have the below code for entering a function and copying the orientation and borders of the above line. But in this it only accept numeric values, how can i modify the code so that i can enter alpa ...
San Jay's user avatar
  • 25
1 vote
2 answers
268 views

I’m having a problem with my code. my while loop 3 times when its meant to loop once i've tried everything i know and it's not working import java.util.Scanner; public class validInput { public ...
ennie Ayeni's user avatar
-2 votes
5 answers
1k views

#Develop a program that reads a four-digit integer from the user and displays the sum of the digits in the number. For example, if the user enters 3141 then your program should display 3+1+4+1=9. ri =...
TahaAvadi's user avatar
-2 votes
1 answer
72 views

I am looking a way to assign value to printed sentence to capitalize the first letters. The output should be: "Hello World!". This is my current code and the answer is "HELLO NEW WORLD&...
Tommy's user avatar
  • 3
0 votes
0 answers
144 views

I have code from a project that looks at options and prices of used cars. It contains a Dictionary of Dictionaries called "DictOfDictMakeModel". Several "For Each" loops use "...
Astro Boy's user avatar
0 votes
1 answer
98 views

In the course of converting some variables from an API, I need to check if the API is returning a string, such as " N/A", and not a number such as "824". This is the code that I'...
Steven Sheeley's user avatar
0 votes
1 answer
44 views

I have been working on a test average calculator where the user is supposed to enter any amount of test scores he wants and the number needs to be both an integer (the teacher wants us to use ...
Darcy Gott's user avatar
0 votes
2 answers
169 views

#user inputs a number number = input("Enter number: ") # 1) changes dot and creates a new string,2) verifies is it a number if(not number.replace(".","").isnumeric()): ...
Asterix's user avatar
  • 19
-2 votes
1 answer
148 views

match = input('Enter match? ') odd1 = input("Enter tip for home: ") if(not odd1.replace(".","").isnumeric()): print("Sorry home tip is not numeric") ...
Miki's user avatar
  • 43
0 votes
2 answers
102 views

I am trying to create a script that cleans a string from anything that is not a number or operator and then performs the calculation. It works fine if, for example, the sting is How much is 25 + 35 ...
lStoilov's user avatar
  • 1,351
0 votes
1 answer
42 views

isr = input() if (isr.isalpha() or (isr.isnumeric() and isr.isalpha())): print("You can't use a letter here.") else: isr = math.sqrt(float(isr)) print(isr) So i ...
Blogames's user avatar
1 vote
3 answers
1k views

I am working on some python code that will evaluate each line of a file, and if that line is a number, it should return false and ignore that line. This code comes from https://github.com/geoff604/...
user3324136's user avatar
0 votes
1 answer
38 views

I am reading a file with some data. I wish to divide the data into several categories and write these into files of their own (for example integers, like phone numbers; decimals; single words; and ...
Arthur's user avatar
  • 33
0 votes
1 answer
412 views

I have 3 nvarchar columns user_3, user_4 and description. I am setting yes and no flag. If the value in description column is equal or in between user_3 and User4 then set the flag to 'N' else set the ...
James Smith's user avatar
0 votes
3 answers
2k views

I have a switch case that checking if char is "=" or "-" or "+" but I like to check also if char is a number from 0-9 public static Token get(char ch) { ...
user63898's user avatar
  • 31.1k
0 votes
2 answers
214 views

I have almost 1,800 Word documents that have about 8 pages with unique data in tables. We were just informed that the data we were given for some of those tables is inaccurate and needs to be changed ...
Brian's user avatar
  • 5
0 votes
1 answer
1k views

In my project, I want to extract all the columns except numeric from my R data frame, as this question I used the same method and just put a not gate into is.numeric() R function but it is not working ...
Indrajith Ekanayake's user avatar
1 vote
2 answers
2k views

I was writing a code to get a student grade point average but I got an error. here is the piece of my code getting error : scoreinput=input("Score lesson: ") while True: if scoreinput....
QuicKiller's user avatar
1 vote
3 answers
2k views

Need some help with this, I pretty have it finished but I can't get it to display or work correctly. Using str_replace, it's suppose to take the actual credit card number and remove the - from it. I ...
Strife_x7x's user avatar
1 vote
2 answers
2k views

I am trying to understand numeric strings in PHP. I have the following code: var_dump(5 * "10 abc"); var_dump(is_numeric("10 abc")); Which gives me the output: int(50) bool(false) ...
Bradley's user avatar
  • 578
0 votes
2 answers
2k views

lst = ['a: 12', 'b: 1.5', 'c: 13'] for lines in lst: entry = lines.split(":") category = entry[0] amount = entry[1].strip() print(amount.isnumeric()) Result is True, False, ...
cccck's user avatar
  • 1
0 votes
1 answer
1k views

I'm having a problem with a SELECT that is throwing a CAST error, but only when the CAST is in the WHERE clause. I've boiled the problem down to the below example SQL. CREATE TABLE dbo.CastTest ( [...
GSS's user avatar
  • 1
0 votes
1 answer
869 views

I want to combine these two conditions in one in PHP. isset( $_GET['number'] ){ is_numeric( $_GET['number'] ){ /*----------------*/ } } I tried below code but it is showing error ...
MostlyFullStack's user avatar
0 votes
1 answer
982 views

I have cobbled together the following formula, which works : =IF(ISNUMBER(SEARCH(F7, $B$11:$B$53)), $C$11:$C$53, IF(ISNUMBER(SEARCH(F8, $B$11:$B$53)), $C$11:$C$53, IF(ISNUMBER(...
RY_STEW's user avatar
0 votes
2 answers
58 views

I entered this code on my text editor and it results in an error. So, do I need to download any kind of files for my Python edition in order to use this isnumeric method? txt = "565543" x = ...
Mohammed AL-Nashriy's user avatar
0 votes
0 answers
315 views

I am trying to do an input validation (Only Accept Numeric Value), however the code below does not seem to work properly. Can someone please shed a light. Upon entering non-numerical Value, the ...
Pitbull999's user avatar
1 vote
2 answers
71 views

it's my first post. Could you give me some tips which code is better and why? Mainly those two codes do the same, but using other methods. Cheers FIRST CODE Private Sub Button1_Click(sender As ...
WuWy's user avatar
  • 11
1 vote
3 answers
3k views

I have a table of numbers that are all left aligned (i.e. Excel recognizes them as text) I run a VBA script on all cells: cell.value = cell.Value * 1 This right aligns all of them and Excel ...
Joka's user avatar
  • 65
0 votes
2 answers
3k views

5 columns (col1 - col5) in a 10-column dataframe (df) should be either blank or have text values only. If any row in these 5 columns has an all numeric value, i need to trigger an error. Wrote the ...
SModi's user avatar
  • 125
3 votes
2 answers
1k views

I am using IsNumeric to check if a part of a variable are numbers or not. Unfortunately it only seems to check the first character of the string part instead of the whole bit. It currently accepts i....
Davey's user avatar
  • 35
1 vote
1 answer
92 views

I have set up this formula, For each cell it should subtract the contents from what i have stored in data!$B$1, in this case this is 300, so if the contents of "Time 1" is 100, this will display 200, ...
TomRGarr's user avatar
0 votes
1 answer
3k views

IsNumeric allows below special characters `SELECT ISNUMERIC('10.50') as '10.50' ISNUMERIC('10,50') as '10,50' ,ISNUMERIC('-') as '-' ,ISNUMERIC('+') as '+' ,ISNUMERIC('$') as '$' ,ISNUMERIC('.')...
Arjun Rathinasamy's user avatar
1 vote
2 answers
128 views

I wrote a function that generates a "score" (1,0,-1) based on a input cell, which should contain a number. However, sometimes the input field might not be numeric and then the function should return ...
yannk's user avatar
  • 51
1 vote
2 answers
704 views

I am looking for a way to detect years e.g. 2019. The requirements I think would be that the numbers are in a row, have four digits and are not adjacent to letters or special characters. So I'd like ...
user6631314's user avatar
  • 2,050
1 vote
2 answers
649 views

I would like to copy and paste a formula from column P to column C using a loop in VBA. The code should only copy and paste for numeric values in column P and do nothing when cell is blank. Sub ...
Robert's user avatar
  • 49
2 votes
5 answers
477 views

Are there faster methods to check the existence of a number (not null) in one column of a multidimensional array in php (for instance, number9)? Attempt: The if statement below seems to be working ...
Emma Marcier's user avatar
  • 27.8k
0 votes
0 answers
121 views

Trying to run the following jQuery script and although the passed value is certainly an integer it silently fails (no debug errors) at isNumeric. No alerts after this either (but the first one does ...
gchq's user avatar
  • 1,803
7 votes
5 answers
4k views

I noticed PHP is_numeric() accepts "E" as a number. I have a string: "88205052E00" and I want the result to be: NOT numeric. Here is the code which I tested. <?php $notnumber = '88205052E00'; ...
Cyborg's user avatar
  • 1,487
0 votes
1 answer
104 views

Iam New in PHP . I Know How to Check a String number or Not using is_numeric but I want Check Mobile Number add + in my case $mobile = "+15666886345" ; if($mobile) { // Valid Mobile ...
safvan saf's user avatar
0 votes
1 answer
139 views

I create field ($login), user should register with email or phone number So I want to o a security check to validate Can I use 2 functions at same time ? I tried the following code but it didn't ...
Dr.Mezo's user avatar
  • 869
1 vote
3 answers
190 views

I have written the following code which reads a file that contains lines with numbers and alphabets I want to calculate sum of all numbers in a single line and skip the lines with alphabets and ...
Mudassir Awan's user avatar
-2 votes
1 answer
31 views

function findIntInStr($str=''){ $str = 'abc123'; for($i=0;!empty($str[$i]);$i++) { if(is_numeric($str[$i])) { return false; } } return true; } This ...
imrahul's user avatar
  • 41
0 votes
4 answers
1k views

I'm trying to pull counts from a survey customers answer over the phone. The survey has 3 questions and the answers are sometimes numeric and sometimes words. I want to count the answers but need the ...
MTG5280_'s user avatar
0 votes
1 answer
131 views

I'm strugling to get my code to work. When trying to evaluate if the value found by my Index(Match()) is a number with IsNumeric I get a "Mismatch Error 13" once every other time. When I don't get the ...
plank's user avatar
  • 13
0 votes
0 answers
73 views

[Required(ErrorMessage = "You need to add your phone number")] public string PhoneNumber { get; set; } I want to allow numbers only and display error message if it's not a number. I also want to ...
Jack Peeterson's user avatar