hello
I need macro to insert row based on using two inputboxes(before,after)
first should show "before inputbox " when write the item based on column A should insert row before the item with the same borders , formulas and if there is any cell is empty or contain formula ,then should show hyphen as in sheet RR when write CFR into inputbox user.
second if I press cancel or close "before inputbox" then should show "after inputbox" when write the item based on column A should insert row after the item with the same borders , formulas ,if there is any cell is empty or contain formula ,then should show hyphen as in sheet SR when write CMR into inputbox user
finally if I don't write any thing into "before inputbox " or "after inputbox" should insert multiple rows at once after last row for each item in column A as in sheet RP with considering the columns will increase every time then when insert row with formula,borders should finish until for any column contain values , if I run the macro again should replace data because the data it will increase every time into sheet MONTHLY
NOTE : all of the condition should implement in sheet MONTHLY.
I need macro to insert row based on using two inputboxes(before,after)
first should show "before inputbox " when write the item based on column A should insert row before the item with the same borders , formulas and if there is any cell is empty or contain formula ,then should show hyphen as in sheet RR when write CFR into inputbox user.
second if I press cancel or close "before inputbox" then should show "after inputbox" when write the item based on column A should insert row after the item with the same borders , formulas ,if there is any cell is empty or contain formula ,then should show hyphen as in sheet SR when write CMR into inputbox user
finally if I don't write any thing into "before inputbox " or "after inputbox" should insert multiple rows at once after last row for each item in column A as in sheet RP with considering the columns will increase every time then when insert row with formula,borders should finish until for any column contain values , if I run the macro again should replace data because the data it will increase every time into sheet MONTHLY
NOTE : all of the condition should implement in sheet MONTHLY.
EX (1).xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | DETALES | JANUARY | FEBRUARY | MARCH | |||||||||||
2 | CODE | GOODS | TYPE | PR | PU | SA | BL | PU | SA | BL | PU | SA | BL | ||
3 | - | - | - | - | - | - | - | - | - | ||||||
4 | CRF | CCR-1 | BMW | 2010 | 380 | 200 | 180 | 19 | 11 | 8 | 350 | 40 | 310 | ||
5 | CCR-1 | BMW | 2011 | 120 | 40 | 80 | 23 | 1 | 22 | 305 | 30 | 275 | |||
6 | CCR-2 | TIGUAN | 2012 | 120 | 0 | 120 | 100 | - | 100 | 135 | 10 | 125 | |||
7 | CMR | CCB-1 | AUDI | 2011 | 80 | 10 | 70 | 234 | - | 234 | 60 | 20 | 40 | ||
8 | CCB-2 | OPEL | 2008 | 100 | 10 | 90 | 123 | - | 123 | 90 | - | 90 | |||
9 | CCB-3 | MER | 2009 | 120 | 10 | 110 | 123 | 1 | 122 | 110 | - | 110 | |||
10 | CCB-3 | MER | 2010 | 101 | - | 101 | 156 | - | 156 | 140 | 70 | 70 | |||
RR |
Cell Formulas | ||
---|---|---|
Range | Formula | |
M3:M10,J3:J10,G3:G10 | G3 | =E3-F3 |
EX (1).xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | DETALES | JANUARY | FEBRUARY | MARCH | |||||||||||
2 | CODE | GOODS | TYPE | PR | PU | SA | BL | PU | SA | BL | PU | SA | BL | ||
3 | CRF | CCR-1 | BMW | 2010 | 380 | 200 | 180 | 19 | 11 | 8 | 350 | 40 | 310 | ||
4 | CCR-1 | BMW | 2011 | 120 | 40 | 80 | 23 | 1 | 22 | 305 | 30 | 275 | |||
5 | CCR-2 | TIGUAN | 2012 | 120 | 0 | 120 | 100 | - | 100 | 135 | 10 | 125 | |||
6 | AGGREGATE | 620 | 240 | 380 | 142 | 130 | 130 | 790 | 80 | 710 | |||||
7 | CMR | CCB-1 | AUDI | 2011 | 80 | 10 | 70 | 234 | - | 234 | 60 | 20 | 40 | ||
8 | CCB-2 | OPEL | 2008 | 100 | 10 | 90 | 123 | - | 123 | 90 | - | 90 | |||
9 | CCB-3 | MER | 2009 | 120 | 10 | 110 | 123 | 1 | 122 | 110 | - | 110 | |||
10 | CCB-3 | MER | 2010 | 101 | - | 101 | 156 | - | 156 | 140 | 70 | 70 | |||
11 | AGGREGATE | 321 | 20 | 301 | 402 | 635 | 401 | 340 | 70 | 270 | |||||
RP |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J11:M11,E11:H11,J6:M6,E6:H6 | E6 | =SUM(E3:E5) |
I6 | I6 | =SUM(J3:J5) |
M7:M10,M3:M5,J7:J10,J3:J5,G7:G10,G3:G5 | G3 | =E3-F3 |
I11 | I11 | =SUM(J7:J10) |
EX (1).xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | DETALES | JANUARY | FEBRUARY | MARCH | |||||||||||
2 | CODE | GOODS | TYPE | PR | PU | SA | BL | PU | SA | BL | PU | SA | BL | ||
3 | CRF | CCR-1 | BMW | 2010 | 380 | 200 | 180 | 19 | 11 | 8 | 350 | 40 | 310 | ||
4 | CCR-1 | BMW | 2011 | 120 | 40 | 80 | 23 | 1 | 22 | 305 | 30 | 275 | |||
5 | CCR-2 | TIGUAN | 2012 | 120 | 0 | 120 | 100 | - | 100 | 135 | 10 | 125 | |||
6 | CMR | CCB-1 | AUDI | 2011 | 80 | 10 | 70 | 234 | - | 234 | 60 | 20 | 40 | ||
7 | - | - | - | - | - | - | - | - | - | - | |||||
8 | CCB-2 | OPEL | 2008 | 100 | 10 | 90 | 123 | - | 123 | 90 | - | 90 | |||
9 | CCB-3 | MER | 2009 | 120 | 10 | 110 | 123 | 1 | 122 | 110 | - | 110 | |||
10 | CCB-3 | MER | 2010 | 101 | - | 101 | 156 | - | 156 | 140 | 70 | 70 | |||
SR |
Cell Formulas | ||
---|---|---|
Range | Formula | |
M3:M10,J3:J10,G3:G10 | G3 | =E3-F3 |
EX (1).xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | DETALES | JANUARY | FEBRUARY | MARCH | |||||||||||
2 | CODE | GOODS | TYPE | PR | PU | SA | BL | PU | SA | BL | PU | SA | BL | ||
3 | CRF | CCR-1 | BMW | 2010 | 380 | 200 | 180 | 19 | 11 | 8 | 350 | 40 | 310 | ||
4 | CCR-1 | BMW | 2011 | 120 | 40 | 80 | 23 | 1 | 22 | 305 | 30 | 275 | |||
5 | CCR-2 | TIGUAN | 2012 | 120 | 0 | 120 | 100 | - | 100 | 135 | 10 | 125 | |||
6 | CMR | CCB-1 | AUDI | 2011 | 80 | 10 | 70 | 234 | - | 234 | 60 | 20 | 40 | ||
7 | CCB-2 | OPEL | 2008 | 100 | 10 | 90 | 123 | - | 123 | 90 | - | 90 | |||
8 | CCB-3 | MER | 2009 | 120 | 10 | 110 | 123 | 1 | 122 | 110 | - | 110 | |||
9 | CCB-3 | MER | 2010 | 101 | - | 101 | 156 | - | 156 | 140 | 70 | 70 | |||
MONTHLY |
Cell Formulas | ||
---|---|---|
Range | Formula | |
M3:M9,J3:J9,G3:G9 | G3 | =E3-F3 |