Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
I currently have a function that counts the blanks in a column and if the column is blank, "* Required" disappears: =IF((COUNTBLANK(E13:E16)=4),"", "* Required!") The character filling the cells in the column is an asterisk, when the cell to the left of that column is empty. This is like your normal web app that has required fields. Problem: I don't want to hard code the function. I would much rather write one that uses something like " 0". The logic would be, if the count of the asterisks in the range is 0 then display the "* Required" else, display nothing. I don't know what function to use to do this. I tried CountIF and CountA but I couldn't get them to work. Any help will be greatly appreciated! -- Sandy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sandy,
could you please re-explain? you say "if the column is blank, "* Required" disappears" And "the count of the asterisks in the range is 0". Are you trying to count the blanks or the asterix? By checking a random form on the web, maybe i got it. - Say you have E1:E10 to be filled - In E1:E10, some cells require an entry. These specific cells are located next to an Asterix in F1:F10. So if E5 is required then F5 contains an asterix. - you want to count the number of cells in E1:E10 that require an entry but haven't been filled yet. If so, try: =IF(SUMPRODUCT((E1:E10="")*(F1:F10="*")*1)0,"* Required","") '-- Regards, Sébastien <http://www.ondemandanalysis.com "Sandy" wrote: Hello - I currently have a function that counts the blanks in a column and if the column is blank, "* Required" disappears: =IF((COUNTBLANK(E13:E16)=4),"", "* Required!") The character filling the cells in the column is an asterisk, when the cell to the left of that column is empty. This is like your normal web app that has required fields. Problem: I don't want to hard code the function. I would much rather write one that uses something like " 0". The logic would be, if the count of the asterisks in the range is 0 then display the "* Required" else, display nothing. I don't know what function to use to do this. I tried CountIF and CountA but I couldn't get them to work. Any help will be greatly appreciated! -- Sandy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sebastien!
That works beautifully. Thanks so much! -- Sandy "sebastienm" wrote: Hi Sandy, could you please re-explain? you say "if the column is blank, "* Required" disappears" And "the count of the asterisks in the range is 0". Are you trying to count the blanks or the asterix? By checking a random form on the web, maybe i got it. - Say you have E1:E10 to be filled - In E1:E10, some cells require an entry. These specific cells are located next to an Asterix in F1:F10. So if E5 is required then F5 contains an asterix. - you want to count the number of cells in E1:E10 that require an entry but haven't been filled yet. If so, try: =IF(SUMPRODUCT((E1:E10="")*(F1:F10="*")*1)0,"* Required","") '-- Regards, Sébastien <http://www.ondemandanalysis.com "Sandy" wrote: Hello - I currently have a function that counts the blanks in a column and if the column is blank, "* Required" disappears: =IF((COUNTBLANK(E13:E16)=4),"", "* Required!") The character filling the cells in the column is an asterisk, when the cell to the left of that column is empty. This is like your normal web app that has required fields. Problem: I don't want to hard code the function. I would much rather write one that uses something like " 0". The logic would be, if the count of the asterisks in the range is 0 then display the "* Required" else, display nothing. I don't know what function to use to do this. I tried CountIF and CountA but I couldn't get them to work. Any help will be greatly appreciated! -- Sandy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
User-Defined Function pre-empting Built-in Function? How to undo???? | Excel Programming |