Check colume if it is not blank

  • Thread starter Thread starter »¨°­
  • Start date Start date
»

»¨°­

I want to check another columes if one of columes are not blank.

For example, I need to check B2,C2,D2,E2 & F2. If B2 is not blank, then A2
will show "1". If D2 & F2 is not blank, it will show "3" in A2.
Thats mean A2 need to show the first item which is not blank.

Does any expansion can do it?
 
Maybe...

=INDEX(B2:F2,MATCH(TRUE,B2:F2<>"",0))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)
 
If the item I check is not continues (B2, D2, F2, H2, J2, ...) , how I
modify the expansion?
 
I would add an indicator row. I'd put X's in the cells in the columns that I
want to inspect.

In your example, I'd put an X in B1, D1, F1, H1, J1, ...)

Then I'd use this formula:
=INDEX(B2:M2,MATCH(1,(B$1:M$1="x")*(B2:M2<>""),0))

(Still an array formula)

Yep, if I had to, I'd insert a new row and hide that row to avoid the clutter.
 

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

Similar Threads


Back
Top