范围... Excel如何复制相同的代码 [英] Range...Excel how to replicate same code
问题描述
这个代码适用于单个单元格B12,其中选择反映了C12中的消息更改。
i想要为一系列行进行。
和B13一样,C13,然后B14,C14,.....等等。
有人可以请帮助
如果范围(B12)=N / A。然后''下拉值选择
范围(C12)=所需细节
ElseIf范围(B12)=否然后
范围(C12)=所需细节
ElseIf范围(B12)="是"那么
范围(C12)="
否则
范围(" C12")="
结束如果
我只想在VBA中打开一个模块窗口并写出这个函数:
展开 | 选择 | Wrap | 行号
我不明白Application.calculate是什么意思.....
< blockquote>每当您对Excel工作表上的一个或多个单元格进行更改时,都会触发工作表的Change事件。在Change事件中插入Application.CalculateFull行:
展开 | 选择 | Wrap | 行号
this code works very well for the one cell B12, where selection made reflects message change in C12.
i want to do it for series of rows.
Like B13, C13 and then B14, C14 , .....and so on.
can someone please help
If Range("B12") = "N/A" Then '' Drop down value selection
Range("C12") = "Details required"
ElseIf Range("B12") = "NO" Then
Range("C12") = "Details required"
ElseIf Range("B12") = "YES" Then
Range("C12") = " "
Else
Range("C12") = " "
End If解决方案I would just open a module window in VBA and write out this function:
Expand|Select|Wrap|Line Numbers
i dont understand what do you mean by Application.calculate.....
Whenever you make a change to one or more cells on an Excel worksheet, this triggers the worksheet''s Change event. Inserting the line Application.CalculateFull inside the Change event as such:
Expand|Select|Wrap|Line Numbers
这篇关于范围... Excel如何复制相同的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆