COUNTBLANK With multiple cell

SAXON10

Board Regular
Joined
Jun 1, 2017
Messages
109
Hi,

Column A(A2:A22) and B(B2:B22) contain ID and text. If column B is blank, I want column C to contain a number that counts down to 1 in the last row that contains a blank cell in column B only. (If column A and B is blank return C blank)

I am apply the following formula but value return wrongly. =IF(B2&A2="",COUNTIFS(B2:$B$22,"",A2:$A$22,""),"")

ID TEXT RESULT

2666 7
2642 6
2689 5
2686 4
2603 3
2698 2
2644 1
2693 DD

2691 DD
2668 DD
2667 DD
2685 DD

2675 DD
2460 DD

2610 BB

2697 BB

https://www.dropbox.com/s/514ikpk0oqdgrjj/ME.PNG?dl=0

please assist me.
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
This seems to work for me.
Place this formula in cell C2 and copy all the way down to C22:
Code:
=IF(AND(A2<>"",B2=""),COUNTBLANK(B2:B$22)-COUNTBLANK(A2:A$22),"")
 
Upvote 0
This seems to work for me.
Place this formula in cell C2 and copy all the way down to C22:
Code:
=IF(AND(A2<>"",B2=""),COUNTBLANK(B2:B$22)-COUNTBLANK(A2:A$22),"")

thank you so much for your help, formula working fine.
Sorry I forgot to mention one thing, how to apply the same formula the following condition, when column A&B contain text and B blanks value return blanks in column C.
Count return when column A&B contain number and blanks

https://www.dropbox.com/s/nft7n7jw9t0xuy5/ME.PNG?dl=0
 
Upvote 0
when column A&B contain text and B blanks value return blanks in column C.
Count return when column A&B contain number and blanks
I am sorry, this is very unclear to me. How can column B contain text and be blank at the same time?

I am not able to download files or see images from those file/image share locations. Our corporate security policy blocks all of those. So you will have to do your best to explain it or use one of the tools to post screen images directly to this post (they are listed in Section B of this link here: http://www.mrexcel.com/forum/board-a...forum-use.html).
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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