Build Table Based on Cell Values

jski21

Board Regular
Joined
Jan 2, 2019
Messages
155
Office Version
  1. 2016
Platform
  1. Windows
Good day Mr. Excel Team!

Is there a way to build a table based on cell values? Example: I'm tracking journeymen and apprentices. There is a variable ratio depending on the trade. For simplicity here, let's say there has to be 2 apprentices for each journeyman (2:1). So if I entered 2 for journeymen (Cell B1) and 2 for apprentices (Cell B2), the resulting table would have 2 journeyman entries and 4 apprentice entries. Like this:

Sample.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAAB
1Number of Journeymen:2
2Apprentice Ratio:2
3
4
5
6
7Week #18SMTWThFSTotalNameHrly RateTotal FringeFringe hrlyTotal per hourWage Dec. HrWage Dec. FringWage Decision total Wage Overtime RateJrny Wage DifferenceJrny Overtime DifferenceApp DifferenceApp OT DifferenceApprentice Rest S HrsApprentice Rest OT HrsApp Wkr Rest SApp Wkr Rest OTRestitution payment
8Dates9-Apr10-Apr11-Apr12-Apr13-Apr14-Apr15-Apr
9Jrny 1 SStraight0.008.008.008.008.0032.00Jrny 1 S33.74816.32
10Jrny 1 OTOT0.00
11Jrny 2 SStraight0.008.008.008.008.008.0040.00Jrny 2 S33.741,020.40
12Jrny 2 OTOT0.00
13
14App 1 SStraight0.008.008.008.008.008.0040.00App 1 S28.68928.40
15App 1 OTOT0.00
16App 2 SStraight0.008.008.0016.00App 2 S20.2420.45
17App 2 OTOT0.00
18App 3 SStraight0.008.008.008.008.008.0040.00App 3 S20.24396.72
19App 3 OTOT0.00
20App 4 SStraight0.008.008.008.008.008.0040.00App 4 S20.24396.72
21App 4 OTOT0.00
Data
Cell Formulas
RangeFormula
J14:J21,J9:J12J9=SUM(C9:I9)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
L21Cell Value<IF(L21>0,L20*1.5)textNO
L19Cell Value<IF(L19>0,L18*1.5)textNO
L15Cell Value<IF(L15>0,L14*1.5)textNO
L17Cell Value<IF(L17>0,L16*1.5)textNO
L12Cell Value<$L$6*1.5textNO
L10Cell Value<IF(L10>0,L9*1.5)textNO
L12Cell Value<IF(L12>0,L11*1.5)textNO



There are 2 rows per entry (straight time and overtime). No worries on the dat shown here as that is entered by a user. I can get the headings filled and other bits through VBA, I just don't have the expertise to get the basic table built based on the cell values.

Many thanks in advance for the review and guidance.


jski
 

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,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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