excel - Create Dynamic Named Range, based on adjacent value - Stack Overflow

Without using VBA (need to save as .xlsx), is there a way to create a dynamic named range?Name

Without using VBA (need to save as .xlsx), is there a way to create a dynamic named range?

Name            Include
Dr. Nick        Yes
Dr. Hibbert     No
Dr. J           No
Dr. Spaceman    Yes

I am trying to conditional format another table, where the "Name" is to be Included.

What I have tried is creating a named range, =Index($A$2:$A$5,Match("Yes",$B$2:$B$5,0)).
Unfortunately, this only seems to grab the first name in the list (Dr. Nick above).

It's possible this is an X/Y Issue, so my real ultimate goal is to highlight cells in one table, if in another table a value adjacent to that cell, is "Yes".

So if someone goes in and updates my top table, say putting "Yes" next to Hibbert and J, then the table with that highlighting automatically highlights the additional two.

Is this possible without VBA?

Without using VBA (need to save as .xlsx), is there a way to create a dynamic named range?

Name            Include
Dr. Nick        Yes
Dr. Hibbert     No
Dr. J           No
Dr. Spaceman    Yes

I am trying to conditional format another table, where the "Name" is to be Included.

What I have tried is creating a named range, =Index($A$2:$A$5,Match("Yes",$B$2:$B$5,0)).
Unfortunately, this only seems to grab the first name in the list (Dr. Nick above).

It's possible this is an X/Y Issue, so my real ultimate goal is to highlight cells in one table, if in another table a value adjacent to that cell, is "Yes".

So if someone goes in and updates my top table, say putting "Yes" next to Hibbert and J, then the table with that highlighting automatically highlights the additional two.

Is this possible without VBA?

Share asked Mar 3 at 20:12 BruceWayneBruceWayne 23.3k16 gold badges75 silver badges121 bronze badges 2
  • 1 IIUC, should be doable using a rule based on XLOOKUP. – BigBen Commented Mar 3 at 20:25
  • @BigBen - Oooh, as well-versed in Excel formulas as I am, I must admit I've seldom used XLOOKUP, will look in to that, thanks! – BruceWayne Commented Mar 3 at 21:22
Add a comment  | 

1 Answer 1

Reset to default 3

Paste this in a new sheet:

Name Include Name City
Dr. Nick Yes Dr. J Philadelphia
Dr. Hibbert No Dr. Spaceman NYC
Dr. J No Dr. Hibbert Springfield
Dr. Spaceman Yes Dr. Nick Springfield

Apply a conditional format to range D2:E5 with this formula:

=COUNTIFS($A:$A,$D2,$B:$B,"Yes")

In case you want to apply the rule to a different range (say the entire column) remember to change the row of $D2 so it is the first row of the range you've applied the conditional formatting. Of course if you change also the column, you should change the column too; just keep the reference absolute.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745074149a4609732.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信