VBA transfer data in specific cells to table (based on conditions)

Decon6

New Member
Joined
Jul 18, 2019
Messages
1
Hello everyone,

I need your help with writing a VBA-script to automate a daily work.
Every day I receive multiple data entry sheets (Excel) by mail. I have to extract the data in the sheets to a table in another workbook stored on my drive.
All sheets have the same format, which means the data is always in the same cell on every data entry sheet (eg The name is always in cell B4).

A simplified example of the sheet:

KeyAB123
Name:Alisha
Age:25
Weight:53kg

<tbody>
</tbody>

What I want to achieve:

Step 1
- Copy the unique key (always in cell C1) on the data entry sheet.
- Go to the workbook with the table and search for the column named "Key".
- Find the last entered row in that column and paste the key in the next available row.

Step 2
- Copy the name (always in cell B3) on the data entry sheet.
- Go to the workbook with the table and search for the column named "Name".
- Search for the row on which you entered the unique key.
- Paste the name on the right spot (in the column "Name" and in the row of the unique key).

:eek: The search function is very important, because the columns can change in the target table.

Step 3 (till ...)
-
Repeat step 2 for all other values on the data entry sheet.


Is there any possibility to achieve this?

Thanks in advance.

Greetings
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

dmt32

Well-known Member
Joined
Jul 3, 2012
Messages
6,027
Office Version
2019
Platform
Windows
Hi,
Welcome to Forum.

Work approach you outline seems time consuming & tedious.

As a suggestion, If your colleagues have access to a folder on your corporate network then you could with some VBA, set their templates to write the data directly to a master workbook (like a database) You could then just extract records from master workbook as required in one go.

Dave
 
Last edited:

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,239
Messages
5,509,994
Members
408,768
Latest member
ndg4405

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top