简体   繁体   中英

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).

在此处输入图片说明

and

在此处输入图片说明

I'd like to copy this ID into every cell in the column next to the XY coordinates. Like to:

在此处输入图片说明

The number copied should coincide with the last ID, which comes up with the ;9.

I've tried this, but it does not update the ID number automatically.

在此处输入图片说明

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.

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:

In A2:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM