VBA code for copying and combining data from 2 sheets (joining 2 tables into a new one)

mulmar74

New Member
Joined
Apr 3, 2017
Messages
1
Hello,

I am looking for some help with my little challenge.

I am trying to combine data from 2 different sheets in an automated way, but I don't know VBA and macro well enough to get this to work without help.

I have 2 sheets and I want all the combinations from the to sheets to be copied to sheet3:

To make it easier to explain this if give an example of my situation (my actual tables are much bigger, but for explaining it this should be sufficient)
SHEET1
itempricestartend
ABC101-1-1731-12-17
DEF151-1-171-1-18
GHI201-3-173-3-18

<tbody>
</tbody>

SHEET2
contactcountrynumber
NameANL12345678
NameBBE87654321
NameCFR45678123

<tbody>
</tbody>

SHEET3 (result)
itempricestartendcontactcountrynumber
ABC101-1-17 31-12-17NameANL12345678
DEF151-1-171-1-18NameANL12345678
GHI201-3-173-3-18NameANL12345678
ABC101-1-1731-12-17NameBBE87654321
DEF151-1-171-1-18NameBBE87654321
GHI201-3-173-3-18NameBBE87654321
ABC101-1-1731-12-17NameCFR45678123
DEF151-1-171-1-18NameCFR45678123
GHI201-3-173-3-18NameCFR45678123

<tbody>
</tbody>

If there is a simple way to realize this without a macro? if not can somebody help me out with a macro for this?

Any help is very much appreciated.

Thanks,

Martin
 

Forum statistics

Threads
1,081,454
Messages
5,358,771
Members
400,513
Latest member
sdrowsick

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top