put the values under empty column based on headers

MKLAQ

Active Member
Joined
Jan 30, 2021
Messages
397
Office Version
  1. 2016
Platform
  1. Windows
I have two sheets contain data with same structure. so what I want matching items for columns B,C,D together for two sheets DATA,INPUT if they are matched then should put the values under empty columns contain headers names PU,SA into sheet INPUT from the sheet DATA , if I run macro again , then should move to next empty columns contain headers names PU,SA after three filled columns PU,SA,BL and so on every time run the macro should search for the headers PU,SA are empty cells ,then should fill based on match column B,C,D together . the aim for this every week changes the values and increase or changes data in sheet DATA and I have to add the values into new columns PU,SA.

Microsoft Excel (6).xlsx
BCDEFG
1DESCRIBEQ1
2GOODSTYPEPRPUSABL
3CCR-1BMW2010380200180
4CCR-1BMW20111204080
5CCR-2TIGUAN20121200120
6CCB-1AUDI2011801070
7CCB-2OPEL20081001090
8CCB-3MER200912010110
9CCB-3MER2010101101
data
Cell Formulas
RangeFormula
G3:G9G3=E3-F3




Microsoft Excel (6).xlsx
BCDEFGHIJKLM
1DESCRIBEQ1Q2Q3
2GOODSTYPEPRPUSABLPUSABLPUSABL
3CCR-1BMW2010000
4CCR-1BMW2011000
5CCR-2TIGUAN2012000
6CCB-1AUDI2011000
7CCB-2OPEL2008000
8CCB-3MER2009000
9
input
Cell Formulas
RangeFormula
G3:G8G3=E3-F3
M3:M8,J3:J8J3=G3+H3-I3



result for two condition as example
Microsoft Excel (6).xlsx
BCDEFGHIJKLM
1DESCRIBEQ1Q2Q3
2GOODSTYPEPRPUSABLPUSABLPUSABL
3CCR-1BMW2010380200180180180
4CCR-1BMW201112040808080
5CCR-2TIGUAN20121200120120120
6CCB-1AUDI20118010707070
7CCB-2OPEL200810010909090
8CCB-3MER200912010110110110
9
input
Cell Formulas
RangeFormula
G3:G8G3=E3-F3
M3:M8,J3:J8J3=G3+H3-I3



ورقة عمل Microsoft Excel جديد (6).xlsx
BCDEFGHIJKLM
1DESCRIBEQ1Q2Q3
2GOODSTYPEPRPUSABLPUSABLPUSABL
3CCR-1BMW2010380200180380200360360
4CCR-1BMW2011120408012040160160
5CCR-2TIGUAN201212001201200240240
6CCB-1AUDI20118010708010140140
7CCB-2OPEL2008100109010010180180
8CCB-3MER20091201011012010220220
input
Cell Formulas
RangeFormula
G3:G8G3=E3-F3
M3:M8,J3:J8J3=G3+H3-I3

thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

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