diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-01-28 12:33:21 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-01-28 12:33:21 +0300 |
commit | aea6e224c28401755c80d6b90b9398c59c09b161 (patch) | |
tree | 1391921249b74102c29a2602e9cfca46188c0306 /src/PriceListTools | |
parent | 952ca22316b4e4ac25004cd453baac1afac5adaf (diff) |
Exit loop if first search returns nothing
Diffstat (limited to 'src/PriceListTools')
-rw-r--r-- | src/PriceListTools/PriceListTool.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/PriceListTools/PriceListTool.cs b/src/PriceListTools/PriceListTool.cs index cf2cd59..c3cc137 100644 --- a/src/PriceListTools/PriceListTool.cs +++ b/src/PriceListTools/PriceListTool.cs @@ -39,6 +39,12 @@ namespace RehauSku.PriceListTools foreach (var kvp in dictionary) { Range foundCell = TargetFile.skuCell.EntireColumn.Find(kvp.Key.Sku); + if (foundCell == null) + { + missing.Add(kvp); + continue; + } + string foundCellGroup = groupColumn[foundCell.Row, 1].ToString(); while (foundCell != null && foundCellGroup != kvp.Key.Group) |