PDA

View Full Version : VBA Code to copy data from two sheet ,paste into corresponding sheet



jackhack33
06-30-2022, 04:53 PM
Hi experts

I have set of data in two sheet, i want copy data from 2 sheet , paste into corresponding value sheet name, through multiple command buttons

for e.g
Condition 1 : Rawsheet1 Column B have data south and Rawsheet2 Column B have data south, from both sheet all data south copy to south sheet, 1st range(A30:G30) 2ND RANGE(I30:O30)
Condition 2 : In sheet south In column C have states data when i click state wise command button corresponded states data will be in both range
please find the attachment

snb
07-01-2022, 12:28 AM
Store the data as a database (do not split them into several worksheets/files/folders.
Create a separate representation worksheet to filter and show (pivottable, slicers, graphs, charts, etc ) selected data.

jackhack33
07-01-2022, 01:30 AM
Brother can u help me with slicers ? atleast

Aussiebear
07-01-2022, 04:00 AM
As snb has suggested
Store the data as a database your data is clearly more suited to a database rather than excel. However since you seem persistent then have you considered using the filter command?

All of the data could reside in one sheet, then using Filter you could display the requested data within table.

example: =Filter( named table, ((Filter 1 )* (Filter 2)* (Filter3)) etc where the filter conditions could represent Id's, Region, State.Address, Phone, Mobile, Email.
only problem I initially see is that you have identical ID's for one or more people ( that's a No No in anyones language)

macropod
07-08-2022, 09:27 PM
Cross-posted at: VBA Code to copy data from two sheet ,paste into corresponding sheet through cmdbutton (msofficeforums.com) (https://www.msofficeforums.com/excel-programming/49286-vba-code-copy-data-two-sheet-paste.html)
Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3