Advice on keeping data current across 2 sheets

Dungadin

New Member
Joined
Mar 16, 2016
Messages
7
Looking for advice and help.

I have a user form that can enter, search, edit and delete information that I need to expand on.

Currently all the information is stored in 1 sheet, "Data". Which is the source and copy location for a filter for the "master data" (if you will).

For example, if I wanted to search for "Doe" in my user form, I would select the column header from a combobox in the userform, which would populate cell AA1, and from a textbox in the userform, "doe" would be populated in cell AA2, which would then search, filter and copy the data from Row 2, A:V to Row 2 AC:AX, and then display that information in listbox in the userform. I can then double click the data in the listbox which populates associated textbox's, which I can edit and save the new information.

This is all well and good for the first 7 columns A:G. The problem is, there are times I need to search by either, year, color, make, model or plate#. Since this information is in multiple columns, and I need it to be displayed in the listbox as single line items, I need to copy and keep up to date, the same information in a 2nd sheet.

ABCDEFGHIJKLMNOPQRSTUV
1LotSPACE #SchedLast NameFirst NameID NUMBERGradeV1 YearV1 ColorV1 MakeV1 ModelV1 Lic. PLATE #V2 YearV2 ColorV2 MakeV2 ModelV2 Lic. PLATE #V3 YearV3 ColorV3 MakeV3 ModelV3 Lic. PLATE #
2Gold306EVITDoeJohn111277122004GoldToyotaHighlanderAAA11112004GreyToyotaCamryABC32422008BlackHondaAccordOUI2309
3Gold309ERSmithSam122448122000BlueFordRangerASD7987
4Gold310ERBowersHedwig364268122005GoldAcuraTLGVS89372002WhiteFordF150WJH6432

<tbody>
</tbody>
Data

Because I'm having problems being able to search multiple columns and display this information in the UserForm, I need to basically copy this information and condense it so it will display properly in the userform.

ABCDEFGHIJKL
1LotSPACE #SchedLast NameFirst NameID NUMBERGradeYearColorMakeModelLic. PLATE #
2Gold306EVITDoeJohn111277122004GoldToyotaHighlanderAAA1111
3Gold306EVITDoeJohn111277122004GreyToyotaCamryABC3242
4Gold306EVITDoeJohn111277122008BlackHondaAccordOUI2309
5Gold309ERSmithSam122448122000BlueFordRangerASD7987
6Gold310ERBowersHedwig364268122005GoldAcuraTLGVS8937
7Gold310ERBowersHedwig362574122002WhiteFordF150WJH6432

<tbody>
</tbody>
Data2



I see there being 2 options for this.
1. When the data is entered, I could write into the VBA to enter it into the 2 different locations. If I do that, then I would also need to write into the sub's to also edit or delete in the 2 locations.

2. Write a single sub, that copies the current data from sheet 1 (data) to the 2nd location sheet 2 (data2). But if I do a copy and paste code, won't it just keep adding the data to it? Or do I need to do some sort of "clear" to remove the data in the 2nd location? Or a filter?

With option 1, I think I can figure out how to write all of that, just going to be a bit time consuming and I think susceptible to errors. Because even though it's supposed to be edited through the userform, I can see someone going directly to the worksheet and editing the data there.

With option 2, I have no idea how that code would even look.

Please advise....and thank you for your help.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I saw a similar posting from you earlier this month and you did not receive any help.

I believe it is always best to explain what your attempting to do. You seem to be telling us how you want to do this instead of letting us figure out the best way to accomplish the task.

Like this:
I would select the column header from a combobox in the userform, which would populate cell AA1 and even more.

I think your goal is to search for a parking location.

But you want the option to search by several different values like Color Make License number and more I believe I saw in your previous post.

And I never understood where to end result would be entered.

If you were to search by license number and that number was found what would you want the result to be.

Like if you entered 789456 into Userform Textbox1 we could have a script search the entire sheet for that number and a pop up message box that would tell you what column and what row we found that license plate number in.

In this case there would never be more then one
Now if we searched for parking location by Car color there could be more then one result.
There may be several cars in the parking lot which is Red

We would not need to specify the exact column to search

We can search a range like Range("A1:L400")


Please post back why something like this would not work.

And provide what you want the final result to be and let me figure out how to do it.
I like helping so I hope I will be able to help you.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top