当前位置: 首页 > news >正文

【EXCEL】【VBA】处理GI Log获得Surf格式的CONTOUR DATA

【EXCEL】【VBA】处理GI Log获得Surf格式的CONTOUR DATA

    • data source1: BH coordination table
    • data source2:BH layer table
    • process 1:Collect BH List To Layer Table
    • process 2:match Reduced Level from "Layer"+"BH"

data source1: BH coordination table

data source2:BH layer table

image-20250211221032901

process 1:Collect BH List To Layer Table

Sub FindBHForAllLayers()
    Dim ws As Worksheet
    Dim wsTarget As Worksheet
    Dim resultRow As Long
    Dim col As Long, targetCol As Long
    Dim lastCol As Long
    Dim layerName As String
    
    Set ws = ThisWorkbook.Sheets("Layer summary")
    Set wsTarget = ThisWorkbook.ActiveSheet
    lastCol = ws.Cells(1, ws.Columns.Count).End(xlToLeft).Column
    
    ' 清除之前的结果
    wsTarget.Range("C2:ZZ50").ClearContents
    
    ' 遍历每个可能的layer起始列(B,G,L...)
    For targetCol = 2 To lastCol Step 5
        layerName = wsTarget.Cells(1, targetCol).Value
        If Not IsEmpty(layerName) Then
            resultRow = 2 '每个layer从第2行开始填写
            
            ' 在Layer summary中搜索这个layer
            For col = 1 To lastCol Step 5
                If Not IsEmpty(ws.Cells(1, col)) Then
                    ' 检查该组中的Description列是否包含当前layer
                    Dim rng As Range
                    Set rng = ws.Range(ws.Cells(1, col + 3), ws.Cells(50, col + 3))
                    
                    If Not IsError(Application.Match(layerName, rng, 0)) Then
                        ' 写入到layer名称的右边一列
                        wsTarget.Cells(resultRow, targetCol + 1).Value = ws.Cells(1, col).Value
                        resultRow = resultRow + 1
                    End If
                End If
            Next col
        End If
    Next targetCol
End Sub

相关文章:

  • AI驱动的广告制作革命:Icon如何实现从创意到成片的全流程自动化
  • OpenCV2D 特征框架 (22)人脸检测的一个类cv::FaceDetectorYN的使用
  • Sentinel——Spring Boot 应用接入 Sentinel 后内存开销增长计算方式
  • 1.攻防世界 unserialize3(wakeup()魔术方法、反序列化工作原理)
  • rocketmq-netty通信设计-request和response
  • APP端网络测试与弱网模拟!
  • ASP.NET Core用MediatR实现领域事件
  • 【蓝桥】线性DP--最快洗车时间
  • opencascade 标注-直线标注、半径标准、角度标注
  • STM32+Proteus+DS18B20数码管仿真实验
  • 23页PDF | 国标《GB/T 44109-2024 信息技术 大数据 数据治理实施指南 》发布
  • QML使用ChartView绘制饼状图
  • python-leetcode 23.反转链表
  • 【ubuntu24.04】 强制重启导致大模型的磁盘挂载出错
  • RockyLinux AlmaLinux RedHat 8,9安装图形化
  • Golang的多团队协作编程模式与实践经验
  • 大模型笔记:pytorch实现MOE
  • 华硕笔记本怎么一键恢复出厂系统_华硕笔记本一键恢复出厂系统教程
  • 支持向量机原理
  • NGINX相关的知识点
  • 做旅游平台网站找哪家好/搜索引擎调词工具
  • 如何查公司网站谁家做的/百度公司高管排名
  • 做网站 需要什么营业执照/网站推广的内容
  • 企业网站内的问答模式怎么做/品牌营销策划培训课程
  • 手机上传网站源码/网络营销郑州优化推广公司
  • app聊天软件开发/aso优化注意什么