[英]Populate empty rows based on values in specific columns
I have a sheet that contains the customer code, store name, street and city and some other columns.我有一张包含客户代码、商店名称、街道和城市以及其他一些列的表格。 The problem is that some of the columns are blank because some data were copied from elsewhere.
问题是某些列是空白的,因为某些数据是从其他地方复制的。 For example:
例如:
Code![]() |
Name![]() |
Street![]() |
Ort![]() |
City![]() |
---|---|---|---|---|
1111 ![]() |
Shop1![]() |
Felder Str.![]() |
3278 ![]() |
Herslden![]() |
Shop1![]() |
Herslden![]() |
|||
1211 ![]() |
ShopX![]() |
Walkt Str.![]() |
4414 ![]() |
Windsheld![]() |
Shop X![]() |
Windsheld![]() |
I want to be able to populate the empty columns based on the "Name1" and "Ort" columns.我希望能够根据“Name1”和“Ort”列填充空列。 So for example, if 'Name' is "Shop 1" and City is "Herslden", copy the content of its Code, Street and Ort columns into the ones which are empty.
例如,如果“名称”是“Shop 1”,城市是“Herslden”,则将其 Code、Street 和 Ort 列的内容复制到空的列中。 In the end, have something like:
最后,有类似的东西:
Code![]() |
Name![]() |
Street![]() |
Ort![]() |
City![]() |
---|---|---|---|---|
1111 ![]() |
Shop1![]() |
Felder Str.![]() |
3278 ![]() |
Herslden![]() |
1111 ![]() |
Shop1![]() |
Felder Str.![]() |
3278 ![]() |
Herslden![]() |
1211 ![]() |
ShopX![]() |
Walkt Str.![]() |
4414 ![]() |
Windsheld![]() |
1211 ![]() |
ShopX![]() |
Walkt Str.![]() |
4414 ![]() |
Windsheld![]() |
I was thinking there should be a way to do this using Excel formula or python.我在想应该有一种方法可以使用 Excel 公式或 python 来做到这一点。 I have thousands of rows and to do them manually might take the whole day.
我有数千行,手动完成可能需要一整天。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.