II CELL VALIDATION IN EXCEL II - excel

I want to validate cell value only letters should be allowed at least six and more?
I have tried but I have failed I want to get answers through you I am sure you will try to give me the answer I want as soon as possible?

Dear NARESH VIJAYKUMAR SHINDE
I have done the same thing as you require before, hope you enjoy the solution
You can find the solution on the Microsoft website as an attached link,
https://support.microsoft.com/en-us/office/apply-data-validation-to-cells-29fecbcc-d1b9-42c1-9d76-eff3ce5f7249

If the cell is A1, you can test it as follow:
=IF(ISTEXT(A1), IF(LEN(A1) > 5, TRUE, FALSE), "Not a text")
If you mean Data Validation Excel functionality, you can define the rule as follow:
If you enter a text that is shorter and if you defined an Error Alert message you get the following:

Related

Keep same value of all merged cells

I don't know why every time I fall in love with a program because I found it very useful at first use, but I end up always struggling of its stupidity after a depth use.
So, my journey begins with the excel function "Merge & Center" that warns me that it will only keep the top left value and delete the others, which is very stupid because I can no longer drag a function in a cell to the others, did no one in this planet suggested that it will be way easier to keep the same value in each merged cells or to put at least a simple checkbox to give the user the option to choose between the two outcomes.
Ok, before I come to this forum I did some research, found a lot of VBA codes, tricks, methods but none gave me the satisfaction that I'm looking for, I concluded that it's impossible to merge and keep values in cells, so can someone please explain to me why Microsoft didn't think of that?
Here is a simple example of what I'm looking for:
enter image description here
As you came to understand, merged cells are Excel's and VBA's worst nightmares! Avoid them (since they also make for terrible datastructures) if you can.
If you must use them and you need a function you can drag down, you'll need to make sure you create a mechanic that can skip certain rows. INDEX() is able to retrieve values with a 2nd parameter that tells the function which row you would like from a given array. If we make sure that this 2nd parameter has a steady incline we can still retrieve the correct values:
Formula in C1:
=INDEX(A:A,ROW()-1-MOD(ROW()-1,3)+1)&B1
After searching all over the internet, I didn't find the perfect solution, so I started learning VBA and I made this beautiful function, it detects if cells are merged or not and if so then it returns the top cell value.
Function Merg(CellRef As Range) As String
Dim MainCell As String
If CellRef.MergeCells Then
MainCell = Left(CellRef.MergeArea.Address, InStr(1,CellRef.MergeArea.Address, ":") - 1)
Else
MainCell = CellRef.Address
End If
Merg = Range(MainCell).Value
End Function
I don't know how to display the code properly on Stackoverflow. It's always a nightmare for me to understand the mechanics, you can visit my same thread on Microsoft Forum.

Excel: Text mining using IF, ISNUMBER, SEARCH

I'm trying to clean up job title data using the formula below:
=IF(OR(ISNUMBER(SEARCH({"admin","reception","account","finance","HR","public","sales","customer","creative","IT","human"},A1))),"",A1)
It should work by eliminating job titles with any of the texts specified in the quotes above. However, I've encountered an issue where it doesn't. In a case where the job title is Quantity Surveyor, the title contains none of the specified texts but Excel seems to reflect it as such. What am I not doing right here?
Quantity Surveyor Example
To extract the information you are looking for, this is the formula you want to use:
=IFERROR(IF(OR(ISNUMBER(SEARCH({"admin","reception","account","finance","HR","public","sales","customer","creative","human"},A1)),NOT(SEARCH("Quantity",A1))),"",A1),"")
Using countif you don't need to check for errors if they occur:
=IF(OR(COUNTIF(A1,{"admin","reception","account","finance","HR","public","sales","customer","creative","human"}))+COUNTIF(A1,"<>Quantity"),"",A1)
Select the part of formula of search, and then press F9. You will find the match result of 6, where it has original value of 'IT', it means Quantity, has IT.
I really donot know why there is negative vote as not useful.
Here is the formula to solve your problem
=IFERROR(LOOKUP(1,0/FIND({"admin","reception","account","finance","HR","public","sales","customer","creative","IT","human"},A1)),A1)
Of course, it is better to define a range instead of hard code {}, like below
=IFERROR(LOOKUP(1,0/FIND($J$2:$J$7,A2),$K$2:$K$7),A2)

Google Sheets Import Data and COUNTIF?

I am using google sheets and trying to Import Data from another sheet into the current sheet, but looking for this imported data to pull certain values.
For example, I need to know how many incomplete assignments were submitted by males. This is what I have thus far...which is not working. I am getting the answer of 4 when I should be getting 2. "Incomplete" is in column A, Male is in K
For example: =COUNTIF(IMPORTRANGE("Key","Sheet!A:A"),"=Incomplete")*(COUNTIF(IMPORTRANGE("Key","Sheet!K:K"),"=Male"))
Also, I need to extend this further and be able to calculate how many students had an excuse for not completing the assignment. I do not need to know the actual reason, I just need to know if there was an excuse. Not applicable is an option, but needs to be ignored. This is what I have thus far, but it will only recognize the first answer, not the rest.
=COUNTIFS(IMPORTRANGE("Key","Sheet!N:N"),{"Absent";"Illness";"Social Issues";"The Dog Ate It";"On Holidays";"Not Interested";"Bored"})
Any assistance greatly appreciated.
Billy
For the males and incompletes, you can use a filter view:
=COUNTA(FILTER(IMPORTRANGE("Key","Sheet!A:A"),IMPORTRANGE("Key","Sheet!K:K")="MALE",IMPORTRANGE("Key","Sheet!A:A")="INCOMPLETE"))
To return counts of excuses on top of this, you can add the istext() criteria to the existing filter:
=COUNTA(FILTER(IMPORTRANGE("Key","Sheet!A:A"),IMPORTRANGE("Key","Sheet!K:K")="MALE",IMPORTRANGE("Key","Sheet!A:A")="INCOMPLETE",ISTEXT(IMPORTRANGE("Key","Sheet!N:N"))))
There may be a better way, but this works:
=COUNTIF(IMPORTRANGE("Key","Sheet!N:N"), "Illness")
+ COUNTIF(IMPORTRANGE("Key","Sheet!N:N"), "Social Issues")
+ COUNTIF(IMPORTRANGE("Key","Sheet!N:N"), "The Dog Ate it")
+COUNTIF(IMPORTRANGE("Key"),"Sheet!N:N"), "On Holidays")
+COUNTIF(IMPORTRANGE("Key","Sheet!N:N"), "Not Interested")
+COUNTIF(IMPORTRANGE("Key","Sheet!N:N"), "Bored")
+COUNTIF(IMPORTRANGE("Key","Sheet!N:N"), "Absent")
Sorry, I forgot the other part.
=COUNTIFS(IMPORTRANGE("Key","Sheet!A:A"), "Incomplete",IMPORTRANGE("Key","Sheet!K:K"),"Male")

Excel IF statement from drop down menu

I am trying to create an IF statement from a drop down menu where I have made the options Yes or No.
I have gone for: =IF(B2=''Yes'',D5,0). This is giving me an error.
However when I try: =IF(B2=Yes,D5,0) it says I have used the wrong data type. Can anyone help?
Thank you
Since this was cross-posted on SuperUser, I'm posting as an answer to "close out" this question:
It seems (based on the formula posted) that you have enclosed Yes in two single quotes (''Yes'') rather than double quotes ("Yes"). Excel uses double quotes for matching text strings, so change your formula to =IF(B2="Yes", D5, 0).

Having hangup with IF AND OR functions. Need one last tweak

Disclaimer: I have never written code in Excel before. I have been building something for work during few days. I have a formula that WORKS! But there is one adjustment that I need to make, that I cannot make happen. Here is what I have. (Again, if its messy, I have no idea, but its currently working).
=IF(AND(D5="Yes LSC, PA's passed")*F5>G5-20,"AT0 Cannot be in same month as W/D",IF(AND(D5="Yes LSC, PA's not passed")*F5>G5-20,"AT0 Cannot be in same month as W/D",IF(AND(E5="Yes, systematic W/D")*F5>G5-20,"AT0 Cannot be in same month as a systematic W/D","")))
Background: I need an excel spreadsheet that we give to new employees as a "cheatsheet" It gives them prompts (I.E "Yes, LSC passed, or Yes, W/D"). They select the prompts and pass to a supervisor for processing.
Goal: I'm trying to write a formula that does not allow simple errors. For my purposes, I know Cell G5 must be AT LEAST 20 greater than F5. So I want an error message to appear every time they try to enter a value that breaks that rule. (Saves management time) And all of that WORKS!
Problem: If G5 is BLANK...It still gives me the message that I've told it to. However, IF G5 is BLANK, I don't need any of the formula to run. I have been trying to build this exception into my amateur formula but I cant get it.
I can understand whats happening.... Excel recognizes that if G5 is blank...then F5>G5-20 is TRUE -- And it gives me text that I want!! But I need an exception... I need it say understand that if G5 is BLANK, then I don't care about F5>G5-20. It can ignore the ENTIRE formula.
Any suggestions? I hope this makes sense.
How would this be?
=IF(ISBLANK(G5),"-", //insert your forumla here// )
an error message to appear every time they try to enter a value that breaks that rule is often handled with Data Validation rather than an IF function. I take it F5 will be completed before G5. Select G5, DATA > Data Tools - Data Validation, Data Validation..., Settings, Allow: Custom, Formula:
=G5>=F5+20
With other settings in their default state this should allow G5 to be blank (or to be populated and then blanked) but give a warning sound and message "The value you entered is not valid." at any attempt to key in an non-compliant value. The warning message may be customised and there is also an option to show an input message where entry of an invalid value is attempted, which might be used to explain the requirement. Alternatively the value might be accepted but later marked as being non-compliant.
It is though rather easy to bypass the validation - just copying from elsewhere and pasting into G5 could do so. Though copying from elsewhere and pasting into the cell with the IF formula would bypass that control too.
Data Validation might also substitute for some of the rest of your IF formula.

Resources