copy data from sheet to two sheets based on match sheet name

Hasson

Active Member
Joined
Apr 8, 2021
Messages
390
Office Version
  1. 2016
Platform
  1. Windows
Hello
I want copying data from INV_PUR sheet to REC & DE sheets based on matching sheet name inside cell D12 if D12 is matching with sheet name REC then

the original data

M.xlsm
ABCDEFGHI
8
9CLIENT
10CVF12
11NAME
12REC
13INV NO
14DES100
15
16
17
18ITEMBATCHGOOD-SSTTT-VVART-IIQTYUNITTOTAL
1911BTR-11CDR1VBF2BNHY20.0010.00200.00
202BTR-12CDR2VBF3BNHY20.005.00100.00
21TOTAL300.00
INV_PUR
Cell Formulas
RangeFormula
I19:I20I19=G19*H19
I21I21=SUM(I19:I20)



M.xlsm
ABCDE
1DATEINVNAMEDEBITCREDIT
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
REC


should copy from INV_PUR sheet (Cells F14,E10,i21) to REC sheet in columns B,C,D .
as to column A should populate date automatically , I21 is not fixed will be changed so should search for TOTAL word in column B and then copy the adjacent value for TOTAL word in column I
result should be

M.xlsm
ABCDE
1DATEINVNAMEDEBITCREDIT
215/04/2023DES100CVF12300.00
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
REC

and should clear INV_PUR sheet for (Cells F14,E10,i21) & B18 :I (before TOTAL row to become like this
MM with corrected CBs v04 a.xlsm
ABCDEFGHIJ
9CLIENT
10
11NAME
12
13INV NO
14
15
16
17
18ITEMBATCHGOOD-SSTTT-VVART-IIQTYUNITTOTAL
1910.00
200.00
21TOTAL0.00
22
INV_PUR
Cell Formulas
RangeFormula
I19:I20I19=G19*H19
I21I21=SUM(I19:I20)


as to DE sheet the only difference should copy TOTAL value in column E
example

M.xlsm
BCDEFGHI
9CLIENT
10AHASS
11NAME
12DE
13INV NO
14ASDF100
15
16
17
18ITEMBATCHGOOD-SSTTT-VVART-IIQTYUNITTOTAL
191BTR-11CDR1VBF2BNHY20.0015.00300.00
202BTR-12CDR2VBF3BNHY20.0010.00200.00
213BTR-13CDR3VBF4BNHY20.0010.00200.00
22TOTAL700.00
INV_PUR
Cell Formulas
RangeFormula
I19:I21I19=G19*H19
I22I22=SUM(I19:I21)



M.xlsm
ABCDE
1DATEINVNAMEDEBITCREDIT
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DE


result


M.xlsm
ABCDE
1DATEINVNAMEDEBITCREDIT
215/04/2023ASDF100AHASS700.00
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DE


M.xlsm
ABCDEFGHI
9CLIENT
10
11NAME
12
13INV NO
14
15
16
17
18ITEMBATCHGOOD-SSTTT-VVART-IIQTYUNITTOTAL
191
20
21
22TOTAL0.00
INV_PUR
Cell Formulas
RangeFormula
I22I22=SUM(I19:I21)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,215,208
Messages
6,123,642
Members
449,111
Latest member
ghennedy

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