How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask The-PC-Guy Your Own Question

The-PC-Guy
The-PC-Guy, Software Engineer
Category: Programming
Satisfied Customers: 1844
Experience:  Extensive Knowledge in PHP, MYSQL, CSS & Javascript
62934938
Type Your Programming Question Here...
The-PC-Guy is online now
A new question is answered every 9 seconds

Hi, You helped me earlier this year with Excel macros. I

This answer was rated:

Hi,

You helped me earlier this year with Excel macro's.

I need the same work done, I need to combine a couple of sheets into one, by matching the same two fields in both sheets and then adding the extra data.

Also when that's done I will need a search engine macro build, to search through the new combined worksheet and show the results on a results page. I can upload the file you created last time, so you can see the example.

Regards,
Danie

The-PC-Guy :

Thanks for using JustAnswer. My name isXXXXX will do whatever I can to answer your question

The-PC-Guy :

thanks for requesting me

The-PC-Guy :

what can I do for you?

Customer:

Hi

Customer:

to what site can I upload a couple of files for you to view ?

The-PC-Guy :

www.wikisend.com

Customer:

http://wikisend.com/download/359660/bcb-1.xlsx

Customer:

that file has two sheets

Customer:

a main sheet

Customer:

and a sheet1

Customer:

there's one common column between the two

Customer:

a sessionname field

Customer:

I need to have all the data from sheet1 imported into the main sheet, so where the session name from main matches the session name from sheet1, sheet1's extra rows should be imported into main

Customer:

where the same session name is XXXXX XXXXX a couple of columns in main, i need them all to be populated with the matching data from sheet1

The-PC-Guy :

is this different from what was done last time?

Customer:

yes a little bit

Customer:

last time there was also a DVD refence field

Customer:

the search will work the same though

The-PC-Guy :

so essentially I am just modifying the formulas from last time to work with the new data.

Customer:

for the combine ? yes that should work

The-PC-Guy :

okay

The-PC-Guy :

that shouldn't be much of an issue

The-PC-Guy :

the 2nd part of your request though

The-PC-Guy :

can pose a bit of a problem

The-PC-Guy :

doing search macros in excel might not be the best idea

The-PC-Guy :

that functionality is already built in anyway

The-PC-Guy :

under find/replace

The-PC-Guy :

if you want to do reporting on specific data

The-PC-Guy :

then you would want a database

Customer:

I'm busy uploading the file with the search funtion

Customer:

http://wikisend.com/download/367354/BCB South Gauteng - 2013-08-13.xlsm

Customer:

On this one, the CFP sheet has all the main info

Customer:

The search input is where the search data is typed in

Customer:

and the results is shown on the results page

The-PC-Guy :

this is not one of my macros

The-PC-Guy :

ok, not exactly sure what you want me to do with this one

The-PC-Guy :

the first one I can do no problem

The-PC-Guy :

its the 2nd one I am not sure on

Customer:

when the first file is combined into one sheet

Customer:

I need the search sheet from the second excel file inserted into the first file

Customer:

to do it's lookup on the combined data

Customer:

and then operate the same as it currently does on the excel file I send you

Customer:

I'm trying to check who I used for the search macro, but can only find you in my email regarding excel macro's

The-PC-Guy :

so for the first sheet

The-PC-Guy :

we are going to take any rows that match the session id

The-PC-Guy :

and copy those to the main sheet

The-PC-Guy :

or let me put it another way

Customer:

yes, that's correct

The-PC-Guy :

any rows that match any session Id in the main sheet that don't already exist in the main sheet should be copied over

The-PC-Guy :

that solves the first problem

The-PC-Guy :

but for the 2nd one

Customer:

but it should not replace, only append to the main sheet

The-PC-Guy :

ok

The-PC-Guy :

i can create a little macro that does that

Customer:

should I upload you an example ?

Customer:

ok thanks

The-PC-Guy :

this assumes all the fields are the same between the 2 sheets.

Customer:

only the sessionname is XXXXX XXXXX

Customer:

that's why I need it combined

The-PC-Guy :

wait the fields dont match

The-PC-Guy :

oh i get it

The-PC-Guy :

i am adding the 5 addtional collumns

The-PC-Guy :

or 4 columns

The-PC-Guy :

from sheet 1

The-PC-Guy :

to sheet 2

The-PC-Guy :

im not appending entire rows

The-PC-Guy :

so a macro would not be necesaary for that

The-PC-Guy :

just a formula modification

The-PC-Guy :

ok

The-PC-Guy :

that takes care of the first 1

The-PC-Guy :

now for the 2nd workbook

The-PC-Guy :

you somehow want that merged with the first

The-PC-Guy :

can you explain what you are looking for with that?

Customer:

correct, first one should look like this then :

Customer:


























COURTCASENUMBERDEFENDANTFIRSTNAMEDEFENDANTLASTNAMEPEOPLEFIRSTNAMEPEOPLELASTNAMEDATETIMEDIVISIONCOURTROOMNUMBERJUDGELASTNAMEJUDGEFIRSTNAME
SS20/2002MARIUS & 5 ANDERVAN DER WESTHUIZENG (5ACC)ABRAHAMS2002-03-04CRIMENO NUMBERERASMUS(J) N C
Customer:

the second file's search macro sheet needs to be applied to the first excel file

Customer:

so after you have run the macro and combined the data

Customer:

the best may be, to create a new excel file, from your macro sheet, copy and special paste the results, so the macro's are removed and only the data remains

The-PC-Guy :

well the macro wasn't mine

The-PC-Guy :

but i will see if I can modify it

The-PC-Guy :

i actually think the best bet

The-PC-Guy :

would be to combine the first sheet via formula

The-PC-Guy :

then copy and paste the combined data into a new sheet

The-PC-Guy :

in the 2nd one

The-PC-Guy :

and modify the search macro to point to the new sheet

The-PC-Guy :

does this sound correct to you?

Customer:

special paste it as values

Customer:

that sounds correct yes :)

The-PC-Guy :

ok

The-PC-Guy :

let me try

The-PC-Guy :

can you check back in a couple of hours?

Customer:

ok sure, it's 8:24PM in South Africa

The-PC-Guy :

ok

The-PC-Guy :

its 225 here

Customer:

so I'm going to bed in 2.5 hours

The-PC-Guy :

in eastern us

Customer:

but will check my mail

The-PC-Guy :

i will have something within an hour, then you can check

The-PC-Guy :

so check back at 9:30

The-PC-Guy :

your time

The-PC-Guy :

then we can go through corrections

The-PC-Guy :

worst case

The-PC-Guy :

if it doesn't get finished today

The-PC-Guy :

we can pick it up tomarow

The-PC-Guy :

thanks

Customer:

ok thanks, XXXXX XXXXX back in an hour

The-PC-Guy :

ok

The-PC-Guy :

here is what I have

The-PC-Guy :

let me switch to Q&a to make this easier

ok here is what I have

here is the completed first sheet

http://ge.tt/8wzMHvq/v/0?c

here is the 2nd

http://ge.tt/50MgHvq/v/0?c

I modified the macro to point to the new sheet in the 2nd

let me know if you need anything else.

Thanks
Customer: replied 3 years ago.

Hi,


 


Can you please re-upload the second file, it's 0bytes.


 


Regards,
Danie

somehow it must have gotten corrupted.
I am uploading now
try this one

http://ge.tt/3L0fVvq/v/0?c

let me know if you have any further problems accessing the file
The-PC-Guy and 2 other Programming Specialists are ready to help you
did you have a chance to try it yet?
Customer: replied 3 years ago.

Thanks, XXXXX XXXXX I changed the sheet name, but managed to also change the macro to work with the new sheet name, so everything is good.