Results 1 to 9 of 9

Import a dataset through multiples IFs and Types

Threaded View

  1. #1
    Registered User
    Join Date
    05-16-2022
    Location
    Paris
    MS-Off Ver
    2021
    Posts
    4

    Import a dataset through multiples IFs and Types

    Hello Excel fellows,



    Quick edit: since "DealDate" and "Date" can be confusing, here is an explanation: DealDate (41000 format) is supposed to be the real date (so column A in Sheet2), and the "Date" (in year) column in Sheet1 corresponds to each year in 3rd in Sheet2. Hope that helps!


    I am pretty new to VBA, and I'd like to improve my skills in VBA.
    First, thank you in advance for your help! The purpose of my demand is really to improve my skills for my job, so the following demand is just a representation of my real task. The goal is to reproduce it with more difficulty, but it will help me a lot if this exemple gets an answer. So again, thanks in advance!


    Goal: the goal of this code would be to input a certain value in the right cell, after the code identifies if the date from the dataset to import corresponds to an existing date in the target worksheets. After it recognizes the date, it has to detect the type of product, and the DealDate of the product. Once it has done it, paste the value in the right cell (row is determined by the date, and column is determined by both DealDate and ProductType). I have included the same explanation in the Excel File, but if you have understood you can avoid reading it


    Exemple of the goal: In Sheet1, we have the value in red "0.7". The code should loop to find the DealDate "41772" in Sheet2 (in rows), and detect it's the "Type A" + "2021" column. Then the code should check the corresponding DealDate (2021) and ProductType (Type A), and then copy the corresponding value (0.7) and paste it into the cell it has defined by identifying the right row (where 41772 is) and the right column (Type A + 2021).


    I've tried to put the architecture on paper to have a clear idea of how it would work, and my guess is there is only a small part of code which is difficult, the rest will be copy and paste through different arguments (detect Type B instead of A ...). Am I right ?


    I hope I was clear in my explanations, though, if you have any question, feel free to ask!

    Best,
    Casperinoo
    Attached Files Attached Files
    Last edited by Casperinoo; 05-16-2022 at 06:40 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Multiples Index/Match/Multiples Columns But to be concatenate in respective Rows
    By AndyJr in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 12-09-2018, 11:21 PM
  2. Replies: 3
    Last Post: 10-20-2017, 12:40 AM
  3. Import variable file counts and types from "Directory" sheet
    By always_learning in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2012, 01:51 PM
  4. Copying a dataset multiple times - and selecting titles for this dataset
    By alocke in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-07-2012, 10:15 PM
  5. [SOLVED] how do I import additional border types into excel?
    By Jo in forum Excel General
    Replies: 1
    Last Post: 03-15-2006, 09:10 AM
  6. Import Txt file via vba but still choose column types
    By Job in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2005, 07:05 PM
  7. [SOLVED] Import Excel Data in dotNet dataset with oledb
    By Fabien in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2005, 07:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1