getting new value if the reference value has a blank cell in next column

sarad agarwal

New Member
Joined
Mar 14, 2016
Messages
20
Hi All,

I have data in this format:
[TABLE="width: 155"]
[TR]
[TD]Auditor[/TD]
[TD]Locale_DE[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Grape[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Grape[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Grape[/TD]
[TD] [/TD]
[/TR]
[/TABLE]

What formula will give me this result?
[TABLE="width: 278"]
[TR]
[TD]Auditor[/TD]
[TD]Locale_DE[/TD]
[TD]Required Value[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]Yes[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD] [/TD]
[TD]Orange_Locale_DE[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD] [/TD]
[TD]Orange_Locale_DE[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD] [/TD]
[TD]Orange_Locale_DE[/TD]
[/TR]
[TR]
[TD]Grape[/TD]
[TD]Yes[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Grape[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Grape[/TD]
[TD] [/TD]
[TD]
[/TD]
[/TR]
[/TABLE]

I.e if all the cells for orange is blank in column b then result in column c should give me the concatenated value of the column a and the header of column b.
 
Sure.

In C2, the COUNTIFS counts how many times that A2 (Apple) appears in A2:A10, AND a non-blank cell appears in B2:B10. In this case it is 1 (row 3). The IF asks, is that zero? It is not, so it goes to the FALSE section of the IF, returning "".

In C5, the COUNTIFS counts how many times that A5 (Orange) appears in A2:A10, AND a non-blank cell appears in B2:B10. In this case it is 0. The IF asks, is that zero? Since it is, it goes to the TRUE section of the IF, returning A5 concatenated (the &) with an underscore and $B$1.
 
Upvote 0
Sure.

In C2, the COUNTIFS counts how many times that A2 (Apple) appears in A2:A10, AND a non-blank cell appears in B2:B10. In this case it is 1 (row 3). The IF asks, is that zero? It is not, so it goes to the FALSE section of the IF, returning "".

In C5, the COUNTIFS counts how many times that A5 (Orange) appears in A2:A10, AND a non-blank cell appears in B2:B10. In this case it is 0. The IF asks, is that zero? Since it is, it goes to the TRUE section of the IF, returning A5 concatenated (the &) with an underscore and $B$1.

Got it, Thank you so much!
 
Upvote 0

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