Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
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 Assemblies
.NET Core
.NET Standard
Active Directory
ADO.NET
Agile Development
AJAX
Alexa Skills
Algorithms in C#
Android
Angular
Architecture
ArcObject
Artificial Intelligence
ASP.NET
ASP.NET Core
Augmented Reality
Aurelia
AWS
Azure
Backbonejs
Big Data
BizTalk Server
Blockchain
Bootstrap
Bot Framework
Business
C#
C# Corner
C, C++, MFC
Career Advice
Chapters
CIO
Cloud
COBOL.NET
Coding Best Practices
Cognitive Services
COM Interop
Compact Framework
Cortana Development
Cryptocurrency
Cryptography
Crystal Reports
Current Affairs
Custom Controls
Cyber Security
Data Mining
Databases & DBA
Design Patterns & Practices
DevOps
DirectX
Dynamics CRM
Enterprise Development
Entity Framework
Error Zone
Exception Handling
Expression Studio
F#
Files, Directory, IO
Games Programming
GDI+
General
Generative Engine Optimization (GEO)
Google Cloud
Google Development
Graphics Design
Hardware
Hiring and Recruitment
HoloLens
How do I
HTML 5
Internet & Web
Internet of Things
Ionic
iOS
Java
Java and .NET
JavaScript
JQuery
JSON
JSP
Knockout
kotlin
Leadership
Learn .NET
LightSwitch
LINQ
Machine Learning
Microsoft 365
Microsoft Office
Microsoft Phone
Mobile Development
Multithreading
Nano Banana
NetBeans
Networking
Node.js
Office Development
OOP/OOD
Open Source
Operating Systems
Oracle
Outsourcing
Philosophy
PHP
Power BI
Printing in C#
Products
Progressive Web Apps
Project Management
Python
Q#
QlikView
R
React
Reports using C#
Robotics & Hardware
Ruby on Rails
Salesforce
Security
Servers
SharePoint
SignalR
Silverlight
Smart Devices
Software Testing
SQL Language
SQL Server
Startups
String in C#
Swift
TypeScript
Unity
UWP
Visual Basic .NET
Visual Studio
WCF
Wearables
Web Development
Web Services
Web3
Windows 10
Windows Controls
Windows Forms
Windows PowerShell
Windows Services
Workflow Foundation
WPF
Xamarin
XAML Standard
XML
XNA
XSharp
Register
Login
7
Answers
C# Excel search and combine
John Luciani
11y
1.4k
0
1
Active Directory
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
)
Related Discussion