简体   繁体   English

给定一个martix,使用它的行/列标题来查找相应的值

[英]given a martix, use its row/column headers to find the corresponding value

在此输入图像描述

so this is how an example of how my data looks like in sheet to now I would like to write a macro which does: Takes the row header (say A1 at sheet1 is value3) Takes the column header (say A2 at sheet1 is header2) so the value of A3 should be 0.918768 at sheet1. 所以这就是我的数据在工作表中看起来如何的一个例子现在我想编写一个宏来做:获取行标题(比如说Sheet1的A1是value3)采用列标题(比如说sheet1的A2是header2)所以在Sheet1,A3的值应为0.918768。

I guess I can count until a certain header/value is found and address to it but is there an easy way to look up? 我想我可以算一下,直到找到某个标题/值并解决它但是有一个简单的查找方法吗?

在此输入图像描述

It sounds like the INDEX and MATCH worksheet functions might be a solution. 听起来像INDEXMATCH工作表函数可能是一个解决方案。 For example, in your second screen capture, the formula in cell C1 could be something like =INDEX(Sheet1!$B$2:$F$6,MATCH(A1,Sheet1!$A$2:$A$6,0),MATCH(B1,Sheet1!$B$1:$F$1,0)) . 例如,在第二个屏幕截图中,单元格C1中的公式可能类似于=INDEX(Sheet1!$B$2:$F$6,MATCH(A1,Sheet1!$A$2:$A$6,0),MATCH(B1,Sheet1!$B$1:$F$1,0))

您可以使用Find for the value,抓住它的ActiveCell,然后只查找((ActiveRow):1)和(1:(ActiveColumn))。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在一行中查找最高的3个值并在Excel中返回相应的列标题 - Find highest 3 values in a row and return corresponding column headers in Excel VBA-在特定的行和工作簿中找到给定标题/字符串的对应列 - VBA - Find the corresponding column of a given header/string in a particular row & workbook 查找某个值是否位于对应列的某个单元格范围内,到与给定行中给定单元格具有相同值的行 - Finding if a value is located in a range of cells in a corresponding column, to a row with the same value as a given cell in a given row 给定Excel中的值列表中的值,如何从第一列/行返回相应的值 - Given a value in an table of values in Excel, how to return the corresponding value from the first column/row 如何检查列中的特定值并删除与其值相对应的整行? - How to check for a particular value in a column and delete the entire row corresponding to its value? 滚动 GuiGridView 以在给定列中查找具有特定值的行 - Scroll GuiGridView to find the row with a specific value in a given column 在excel中的多个工作表中查找给定列和行的值的函数 - Function to find value given column and row across multiple worksheets in excel Excel VBA - 在表列中查找给定值的行号 - Excel VBA - Find Row Number for Given Value in a Table Column Excel VBA - 在表列中查找给定值的多个行号 - Excel VBA - Find several row numbers for given value in table column 从列中查找值并快速返回其单元格的行号 - Find a value from a column and quickly return the row number of its cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM