Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
.NET
.NET Core
.NET MAUI
.NET Standard
Active Directory
ADO.NET
Agile Development
AI
AJAX
AlbertAGPT
Alchemy
Alexa Skills
Algorand
Algorithms in C#
Android
Angular
ArcObject
ASP.NET
ASP.NET Core
Augmented Reality
Avalanche
AWS
Azure
Backbonejs
Big Data
BizTalk Server
Blazor
Blockchain
Bootstrap
Bot Framework
Business
Business Intelligence(BI)
C#
C# Corner
C# Strings
C, C++, MFC
Career Advice
Careers and Jobs
Chapters
ChatGPT
Cloud
Coding Best Practices
Cognitive Services
COM Interop
Compact Framework
Copilot
Cortana Development
Cosmos DB
Cryptocurrency
Cryptography
Crystal Reports
CSS
Current Affairs
Custom Controls
Cyber Security
Data Mining
Data Science
Databases & DBA
Databricks
Design Patterns & Practices
DevExpress
DevOps
DirectX
Dynamics CRM
Enterprise Development
Entity Framework
Error Zone
Exception Handling
F#
Files, Directory, IO
Flutter
Games Programming
GDI+
General
Generative AI
GO
Google Cloud
Google Development
Graphics Design
Graphite Studio
Hardware
Hiring and Recruitment
HoloLens
How do I
HTML 5
Infragistics
Internet & Web
Internet of Things
Ionic
Java
Java and .NET
JavaScript
JQuery
JSON
JSP
Knockout
Kotlin
Langchain
Leadership
Learn .NET
Learn iOS Programming
LINQ
Machine Learning
Metaverse
Microsoft 365
Microsoft Fabric
Microsoft Office
Microsoft Phone
Microsoft Teams
Mobile Development
MongoDB
MuleSoft
MySQL
NEAR
NetBeans
Networking
NFT
NoCode LowCode
Node.js
Office Development
OOP/OOD
Open Source
Operating Systems
Oracle
Outsourcing
Philosophy
PHP
Polygon
PostgreSQL
Power Apps
Power Automate
Power BI
Power Pages
Printing in C#
Products
Progress
Progressive Web Apps
Project Management
Public Speaking
Python
Q#
QlikView
Quantum Computing
R
React
React Native
Reports using C#
Robotics & Hardware
RPA
Ruby on Rails
RUST
Salesforce
Security
Servers
ServiceNow
SharePoint
Sharp Economy
SignalR
Smart Devices
Snowflake
Software Architecture/Engineering
Software Testing
Solana
Solidity
Sports
SQL
SQL Server
Startups
Stratis Blockchain
Swift
SyncFusion
Threading
Tools
TypeScript
Unity
UWP
Visual Basic .NET
Visual Studio
Vue.js
WCF
Wearables
Web API
Web Design
Web Development
Web3
Windows
Windows Controls
Windows Forms
Windows PowerShell
Windows Services
Workflow Foundation
WPF
Xamarin
XAML
XML
XNA
XSharp
Register
Login
7
Answers
C# Excel search and combine
John Luciani
11y
1.8k
1
Reply
Hello,
I have an excel file I generate through a C# program. The file is a combination of data from two database tables organized by Product, Part Number, and Month. I am trying to find an elegant way to combine fields by searching by Part Number and Month and adding the necessary fields together. The below orange highlighted fields are what I need to find and the yellow is what needs to be added together. Essentially take these two sections and combine them into one.
If someone could point me in a good direction that would be awesome!
PRODUCT
COMMODITY
REPORT_DATE
FRUPN
YYYYMM
MONTHYR
FRUCNT
DIF
REPL
TARGET
FRU_FF_ALL_USD
DD
201309
5048998
201210
12-Oct
4076
125684
2
525000
FRU_FF_ALL_USD
DD
201309
5048998
201211
12-Nov
4034
120365
0
525000
FRU_FF_ALL_USD
DD
201309
5048998
201212
12-Dec
4022
124232
2
525000
FRU_FF_ALL_USD
DD
201309
5048998
201301
13-Jan
4018
124381
1
525000
FRU_FF_ALL_USD
DD
201309
5048998
201302
13-Feb
4026
112327
0
525000
FRU_FF_ALL_USD
DD
201309
5048998
201303
13-Mar
4023
124603
4
525000
FRU_FF_ALL_USD
DD
201309
5048998
201304
13-Apr
4022
120471
2
525000
FRU_FF_ALL_USD
DD
201309
5048998
201305
13-May
4013
124166
0
525000
FRU_FF_ALL_USD
DD
201309
5048998
201306
13-Jun
3979
118924
2
525000
FRU_FF_ALL_USD
DD
201309
5048998
201307
13-Jul
3937
121816
3
525000
FRU_FF_ALL_USD
DD
201309
5048998
201308
13-Aug
3928
121572
2
525000
FRU_FF_ALL_USD
DD
201309
5048998
201309
13-Sep
3918
117142
3
525000
PRODUCT
COMMODITY
REPORT_DATE
FRUPN
YYYYMM
MONTHYR
FRUCNT
DIF
REPL
TARGET
FRU_FF_ALL_ESD
DD
201309
5048998
201210
12-Oct
16456
507419
8
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201211
12-Nov
16426
492407
12
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201212
12-Dec
16499
508916
7
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201301
13-Jan
16612
510790
145
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201302
13-Feb
16501
461255
12
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201303
13-Mar
16577
510622
13
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201304
13-Apr
16715
498952
11
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201305
13-May
16730
516832
25
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201306
13-Jun
16790
500242
44
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201307
13-Jul
16720
515942
18
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201308
13-Aug
16849
517897
13
525000
FRU_FF_ALL_ESD
DD
201309
5048998
201309
13-Sep
16855
502933
13
525000
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
Make help cursor
does not implement interface member