Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
365 views
in Technique[技术] by (71.8m points)

excel - 根据列标题和行标题解锁单元格吗?(Unlock cells based on both column and row headers?)

I have a table which looks like this (it changes dynamically).

(我有一个看起来像这样的表(它会动态变化)。) 表

I am trying to make a macro which would unlock only the "light yellow" cells = row 1 contains "Forecast" as a value and column I contains "Actual" as a value.

(我试图制作一个仅能解锁“浅黄色”单元格的宏=第1行包含“ Forecast”作为值,而第I列包含“ Actual”作为值。)

I would later protect the sheet so the user would be able to change value only in these cells.

(稍后我将保护工作表,以便用户仅能在这些单元格中更改值。)

In conditional formatting I use this formula: =(INDIRECT(ADDRESS(1;COLUMN();4))="Forecast")*(INDIRECT(ADDRESS(ROW();COLUMN($I$1);4))="Actual") But I've failed to make something like this work in VBA.

(在条件格式中,我使用以下公式: =(INDIRECT(ADDRESS(1;COLUMN();4))="Forecast")*(INDIRECT(ADDRESS(ROW();COLUMN($I$1);4))="Actual")但是我未能在VBA中完成类似的工作。)

  ask by Tomas Fikrle translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...