Hi All,
I’m trying to lookup company names from Sheet1 to Sheet2. If sheet1 company matches in Sheet2 i need to pick those records and write in Output sheet.
Along with that i need to add few column values LOCATION and TITLE .
When i try to use add data column activity it is giving me errors like Add Data Column: Column ‘Location’ does not belong to table DataTable
I’m attaching my flow for reference .
Note : My code is working fine in filtering just needs to add additional SHEET1 columns to that . CompanyNameMatch.zip (12.7 KB)
Because you set row("Location").ToString at DefaultValue property but Sheet1_dt doesn’t have Location column. (row is from ForEachRow of Sheet1_dt)
Can you modify it to what you expect?
If you’re looking to match and write values between columns in Excel, you can use various functions and methods. Here’s a simple guide:
Scenario: Matching and Writing Values
Let’s say you have data in columns A and B, and you want to match values in column A with those in column B. If a match is found, you want to write a corresponding value from column C to column D.
Steps:
Assuming Data:
Column A: Original data
Column B: Data to match
Column C: Corresponding values to be written
Column D: Results (where you want to write values)
Using VLOOKUP:
In cell D1, you can use a formula like =VLOOKUP(B1, A:C, 3, FALSE).
This formula looks for the value in B1 within the range A:C. If found, it returns the corresponding value from the third column (C). Adjust the formula based on your actual columns.
Drag Down the Formula:
Drag the corner of cell D1 down to apply the formula to other cells in column D.
Handling N/A (Not Found):
If a match is not found, the formula might return N/A. You can handle this using the IFERROR function:
=IFERROR(VLOOKUP(B1, A:C, 3, FALSE), “Not Found”)
This will write “Not Found” in column D if no match is found.
| A | B | C | D |
|--------|--------|--------|--------|
| Apple | Banana | Red | Red |
| Orange | Cherry | Orange | Orange |
| Grape | Apple | Purple | Not Found |
In this example, we are matching values in column B with those in column A. If a match is found, the corresponding value from column C is written to column D. If no match is found, “Not Found” is written.
Adjust the formula and columns based on your specific data and requirements.