How can I check if a cell in Excel contains a number over a specific value? - excel

Before I start: Please don't use VBA in your answers, the project I am working on does not allow this.
I would like to see if a cell contains a number larger than a specific integer, for example 10.
"A1, A2, A3, A4, A5" will be allowed while
"A7, A8, A9, A10, A11" will not be allowed.
Is there any way I can manage this using Excel functions without VBA?
Thanks for your answers!

In B1 enter:
=IF(A1>10,"allowed","not allowed")
and copy down.
EDIT#1:
If the cells contain text in which a number is embedded, then use this Array Formula:
=IF(--MID(SUMPRODUCT(--MID("01"&A7,SMALL((ROW($1:$300)-1)*ISNUMBER(-MID("01"&A7,ROW($1:$300),1)),ROW($1:$300))+1,1),10^(300-ROW($1:$300))),2,300)>10,"allowed","not allowed")
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.

Related

EXcel increment in formula

I am working on excel sheet, but i am having challenge with incrementing; I want to move from a1-a2 to a3 etc. but it's moving from a1 to b1
shows the exact result i am looking for without manually doing it
A solution to solve the issue
You can use the INDIRECT() function:
=FILTER(...,ISNUMBER(SEARCH(INDIRECT("'Participant info'!"&[reference-to-index]),...)
where [reference-to-index] is an index you have running (for example in the cells below your formula) of the cell references just as plain text $A1, $A2, $A3, etc.

Is there a way to add a formula to unique data points in excel?

I am trying to clean some data with this format:
A1 B1 C1
"0,1,0,E,1" "0,0,0,E" "0,1,1,1,2,E"
To obtain the information, I will need to sum up each cell individually, and then calculate the sum over a row.
So far, I have replaced all of the "E"s (for empty) with no data, which removed the E's, and I have replaced all of the commas with "+" signs to add the numbers in the cell. To run the formula of each cell, I will need to now place an "=" in front of each text string, however, if I copy it in with something like "="="&A1" the formula will not run because excel is reading the = as a letter or symbol and not an operator. Do you know of a way to fix this problem?
Thank you so much!
I think this will work for your version ...
=SUM(FILTERXML("<d><c>" & SUBSTITUTE(A1,",","</c><c>") & "</c></d>","//c"))
That's applied like below ...
... there's always someone smarter than me but that seems to work.
It’s not an in place replacement but it keeps your source data intact and provides a nice reconciliation point.
Using a separate sheet for each column of values, given data in cell A1 of
0,0,0,1,0,1,1,E,1,0
In C1, enter the formula
=IFERROR(MID(SUBSTITUTE(SUBSTITUTE($E$14,",",""),"E",""),COLUMN()-2,1)*1, "")
and drag the fill handle to to the right for as many cells as the longest number of data points you have.
Enter your SUM()formula in B1 (you can use the shortcut ALT + =).
Have you tried something like this, please refer the image, where its showing as per your required output, three alternative formulas
1.) Formula used in cell B2
=SUMPRODUCT(IFERROR(--MID($A2,ROW(INDIRECT("1:"&LEN($A2))),1),0))
2.) Formula used in cell D2
=SUMPRODUCT(IFERROR(--MID($C2,SEQUENCE(LEN($C2)),1),0))
The 2nd formula is applicable to Excel 2021 & O365 Users only
3.) Formula used in cell F2
=SUM(IFERROR(--MID($E2,ROW($1:$1000),1),0))
This is an array formula, so requires to press CTRL SHIFT ENTER !
Here is an update, the last formulas, which i have shared, shall work only when the digits are less than 10, however the present formula, shall work for all number of digits,
Formula used in cell B17
=SUMPRODUCT(IFERROR(--MID(SUBSTITUTE($A17,",",REPT(" ",100)),COLUMN(A1:Z1)*99-98,100),0))
Please adjust your range accordingly as per your data.

Auto Copy and Paste Cell Values not Formula to another Cell

I also need to get your help for the same issue. I need to copy the cell values and not the formulas automatically to the other Cell, "automatically" meaning, I don't need to click, use mouse, or any other means to do that, like once theres a value on that specific cell (which is derived from a formula), the value will automatically be copied and pasted in the other cell (without any intervention from my part) (Only the value is copied not the formula)
Note:
The cell should contain only the copied value and not the formula.
Scenario:
A1 Cell : has 250 value
B1 Cell : has a vlookup formula to search for the value of A1 cell (I need to use VLOOKUP as there's a lot of items in the list, and it is "Dynamic", the reason I cannot just use formula "=A1" to get the value directly)
C1 Cell : Needs to copy and paste only the plain value from B1 cell which is 250, not including the vlookup formula, it should be automatically copied without any intervention (Cannot use VBA code / Macro as it will be run in excel online)
Thanks!!
Just use abasic Excel formula.
Example:
The source data is in cell A1.
You want to copy the same value to cell B1.
In cell B1 write:
=A1
That is all.
Additionally, you need to configure correctly the strategy for calculating the formulas:
I managed to find a solution, sharing as might help someone in the future, just needed to use =value(A1), instead of just "=A1", when I did this, the chart can read the values as it is and not the formula behind it. Found another work around as well, by using the formula =A1+0, for some reason this works too. –
=value(A1) works perfectly , If that formula contains a % figure , simple We can multiply by 100 to get the correct value.

EXCEL SUM cells which contain string

I'm trying to write a formula in Excel which will run down a column, and search each cell in that column for the presence of a string (which may be in the middle of another string); if the string is found, move over to another column and add the value in that cell to a running total.
Any gurus willing to help? Thanks a million!
Say we want the running total of the cells in column A containing the work happy. In B1 enter:
=IF(SUBSTITUTE(A1,"happy","")=A1,"",1)
and in B2 enter:
=IF(SUBSTITUTE(A2,"happy","")=A2,"",1+MAX($B$1:B1))
and copy down:
Do you want a running total, or just the total? Either way you can use SUMIF with "wildcards"
For a simple total of all column B values where column A contains the substring "apple" try this formula
=SUMIF(A:A,"*apple*",B:B)
If you actually want a running total you can amend that to this version in C1 copied down:
=SUMIF(A$1:A1,"*apple*",B$1:B1)
Assuming your data is in A1:A7 then you can use the CSE/Array formula:
=SUM(IF(ISNUMBER(A1:A7),A1:A7,0))
Enter the formula with Ctrl+Shift+Enter since this is an Array Formula.

How to check in excel if a cell doesn't contain a list of values

let's say i have a cell in excel with Text, and i have another column of text values. I want to check if that cell contains any of the values in the column.
How to?
Thanks.
Let's say you want to check whether cell B1 contains any of the values in the column A
Then you could use
=COUNTIF(A:A,B1)
If I understand you correctly, this array-entered formula should do it, returning TRUE if a word in ColumnOfTextValues can be found in MyCell.
=OR(COUNTIF(MyCell,"*"&ColumnOfTextValues&"*"))
To array-enter a formula, after entering
the formula into the cell or formula bar, hold down
ctrlshift while hitting enter. If you did this
correctly, Excel will place braces {...} around the formula.
Googled some more and found a solution
=IF(SUMPRODUCT(--ISNUMBER((SEARCH("*"&B1:B10,A1)))),TRUE,FALSE)
returns true if A1 contains any of the strings in B1 to B10

Resources