IF Formula to Specify if cell is empty for users

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following table:

1662015453270.png


In the message column, I am trying to have a message for users if:
1) If all cells from Branch to No of Pages is blank, then no message
2) If any of the cells from Branch to No of Pages is blank, then to display message for example " Date is blank. Please complete". This is assuming the Date cell is blank and all other cells is filled.
3) If some of the cells are filled and others are blank, to display message to specify the cells that is blank. Example, Branch, Date and Transaction Type is filled but no of Policy and No of Pages are blank. So message should be " No of Policy and No of Pages are blank. Please Complete".
3) if all cells from Branch to No of Pages is filled, then display message "Complete"

I tried with the following formula but it not working as intended:

Excel Formula:
=IF(COUNTA(B5:F5)="","",IF(B5="","Branch is blank. Please complete",IF(C5="","Date is blank. Please complete",IF(D5="","Transaction Type is blank. Please complete",IF(E5="","No of Policy is blank. Please complete",IF(F5="","No of Pages is blank. Please complete","Complete"))))))

Appreciate any help.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi, here's an option you can try:

Cell Formulas
RangeFormula
F2:F6F2=IF(COUNTA(A2:E2)=0,"",TEXTJOIN(" and ",TRUE,FILTER(A$1:E$1&" is blank. Please Complete",A2:E2="","")))
 
Upvote 0
Hi, here's an option you can try:

Cell Formulas
RangeFormula
F2:F6F2=IF(COUNTA(A2:E2)=0,"",TEXTJOIN(" and ",TRUE,FILTER(A$1:E$1&" is blank. Please Complete",A2:E2="","")))

With the permission of FormR and his formula above that was used... If you also want it to say "Complete" then can try below... FormR can just inform if it will be correct like this but have tested and working fine on my side if all cells are filled...

Cell Formulas
RangeFormula
F2:F6F2=IF(COUNTBLANK(A2:E2)=0,"Complete.",IF(COUNTA(A2:E2)=0,"",TEXTJOIN(".",TRUE,FILTER(A$1:E$1&" is blank. Please Complete",A2:E2="",""))))
 
Upvote 0
Hi FromR and Jimmy,

Thank you and the solution worked. Appreciate your patience and have a great day.
 
Upvote 0
Hi, great!

Thinking about it though, the "complete" element can be dealt with more simply like this.

Excel Formula:
=IF(COUNTA(A2:E2)=0,"",TEXTJOIN(" and ",TRUE,FILTER(A$1:E$1&" is blank. Please Complete",A2:E2="","Complete")))
 
Upvote 0
Hi,

Just to check. Instead of the message repeating the phrase "Please complete" for all cells that is incomplete, is there a way to modify to say "Please complete" only once at the end of the sentence? Example is as follows:

"Date is blank. Transaction is blank. No of policy is blank. Please complete."
 
Upvote 0
is there a way to modify to say "Please complete" only once at the end of the sentence?
Hi, you could try like this:

Excel Formula:
=IF(COUNTA(A2:E2)=0,"",TEXTJOIN(" and ",TRUE,FILTER(A$1:E$1&" is blank.",A2:E2="","")))&IF(COUNTBLANK(A2:E2)=0,"Complete"," Please Complete")
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top