excel - 遍历 excel 单元格范围并模拟两者的颜色填充
问题描述
在使用 VBA 的 excel 中,我正在编写一个以 2 列(或单元格区域)作为参数的公式。遍历参数的每个单元格,并将第一个参数的单元格填充/颜色分配给第二个参数中的相邻(同一行)单元格。这就是我所拥有的
Public Function ColoredCol(sourceCol As Range, destCol As Range)
For n = destCol.Row To destCol.Rows.Count
destCol(n, destCol.Column).Interior.ColorIndex =sourceCol(n, sourceCol.Column).Interior.ColorIndex
Next
End Function
解决方案
推荐阅读
- java - 如何从合并的excel单元格中获取价值?
- swift - 如果导航堆栈中不存在视图控制器,则推送它
- init - Voltdb init 遇到不可恢复的错误并正在退出
- java - 如何公开和@EmbeddedId 的字段
- tsql - SSIS中的同步参数问题
- javascript - 如何使用具有完整路径的 JavaScript 从服务器读取文本文件?
- c# - 遍历列表以获取“已检查”项目并将它们分配给属性 - HTTPPost
- lua - 使用 lua 读取特定行
- sql - SQL获取最近的日期,双向
- corda - 在 Corda 中,`FungibleAsset` 什么时候应该继承 `OnLedgerAsset`?