简体   繁体   English

使用Excel公式查找ID号并复制到另一列中的单元格

[英]Locating ID number and copying to cell in another column using Excel Formula

I have a specific cell value that signifies that the cell next to it is the ID of my object (in this case the object ID of a shapefile feature). 我有一个特定的单元格值,它表示它旁边的单元格是我的对象的ID(在本例中为shapefile特征的对象ID)。

在此处输入图片说明

and

在此处输入图片说明

I'd like to copy this ID into every cell in the column next to the XY coordinates. 我想将此ID复制到XY坐标旁边的列中的每个单元格中。 Like to: 喜欢:

在此处输入图片说明

The number copied should coincide with the last ID, which comes up with the ;9. 复制的数字应与最后的ID一致;后者带有; 9。

I've tried this, but it does not update the ID number automatically. 我已经尝试过了,但是它不会自动更新ID号。

在此处输入图片说明

Now, I've tried this, but it gives me this error: 现在,我已经尝试过了,但这给了我这个错误:

在此处输入图片说明

Still some errors with this update. 此更新仍有一些错误。 It's only one every few entries. 这只是每隔几个条目中的一个。

在此处输入图片说明

As a hack job you could try something like this: 作为黑客工作,您可以尝试如下操作:

=if(isblank(b2),a1,(if(b2=";9",c2,n/a)

It'll look at the B column and if its blank take the value of the cell above, if there is something there, it'll check for your anchor of ;9 and take the value of the opposing cell providing the value for all the one below it. 它将查看B列,如果其空白为上方单元格的值,则该位置是否有东西,它将检查您的; 9的锚点,并获取相对单元格的值,从而为所有下面的一个。

I'm not sure weather its important to keep the cell blank in column A next to the anchor, if it is, just reference everything a cell higher like so: 我不确定将锚点旁边的A列中的单元格保留为空白是否重要,如果是的话,只需引用较高位置的所有单元格,如下所示:

In A2: 在A2中:

=if(isblank(b1),A1,(if(b1=";9",c1,n/a)

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

相关问题 如何使用公式中的ID引用另一个Excel工作表中的单元格 - how to reference a cell in another excel worksheet using ID from a formula 复制公式以计算具有值的行数到excel中的另一列 - Copying formula to count the number of rows which have a value to another column in excel Excel:将公式应用于另一个公式中列中的每个单元格 - Excel: Apply formula to each cell in column within another formula 将单元格中的数字取一部分,然后将剩余部分移至另一个单元格+ excel公式 - take part of number in cell and move the remaining to another cell + excel formula 如何在Excel公式中使用字符串字母和当前行号表示单元格ID? - How to express cell id using string letter and current row number in an Excel formula? 使用列号的Excel公式范围参考 - excel formula range reference using column number VBA Excel通过列和行偏移将单元格内容复制到另一个 - VBA Excel Copying Cell contents to another via column and row offset 如果在另一个单元格中输入了某个值,是否有一个Excel公式填充多个单元格? - Is there an Excel formula that populates a number of cells, if a certain value is entered in another cell? Excel VBA:将公式复制到任何活动单元格 - Excel VBA: Copying Formula to any active cell Excel:复制单元格公式时为动态INDIRECT - Excel: Dynamic INDIRECT when copying cell formula
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM