Comparing two fields and displaying difference if text is present.

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

What I want to do is have Excell check two fields and if
there are numbers entered into both fields to display
that difference (A1-B1 if there's text in both A1 and B1)
BUT if there is no text in both of those to not display
anything at all, leave C1 totally blank. If that's not
possible, would it be possible to compare the two fields
and if they both have text in them to display the
difference but if there's no text in one or both of them
to display something like [More Info Needed].
 
Hi
try
=IF(COUNTA(A1:B1)=0,"",IF(COUNTA(A1:B1)=1,"more info needed",A1-B1))
 
Place this in C1 and fill down:

=IF(COUNT(A1:B1)<>2,"",A1-B1)

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top