Good day.
I am wanting to create a user form in excel where 1 portion of the data will remain constant but other entered data will be added on multiple rows.
For example. The end result will show a table like this
Operator Lic# Stage Top Bottom
Chevron 12349 1 5000 5010 Chevron
12349 2 4910 4950 Chevron 12349 3
4850 4905
My thoughts were to have a multi page user form with the first tab being the "Header data" (The data that would be duplicated at the start of each row. The "operator" and "Lic#" in the above example).
Another tab(s) will be the other data with enough text boxes to accommodate all of the multiple rows of data. The "Stage", "Top" and"Bottom". (if the max # of "stages" would be 10. I would have 10 text boxes ready to populate for each column name).
I am new with coding. I would know how enter all of the data into 1 row but I would like the code to recognize that each unique "stage" needs to go into the next blank row, with all of the populated "header" data before it. And also recognize that if the stages stops at 8, to NOT create two additional rows with blank data.
I would imagine this would be a looping statement based on the stage #???.
Would really love some help on this.....thank you in advance.
Related
I am completely new to this and I have never touched Power Query in my whole life, but I am surprised on how far I've gotten from fletching data from a website.
My goal is to expand all dynamically my columns (high, hightime, low and lowtime), but it creates column duplication that is automatically renamed which I DO NOT WANT. It would be a pain to manually move over 3000 columns.
My list of items are all in different columns, but I want only the new column stated above in bold.
This is a drawing of what I want it to look like
After all that, I will Transpose the whole table so each columns would be the "Item name".
Expand info picture
This is what it looks like inside a "Record"
I inherited a rather large worksheet and the fundamental task of my application is to insert a variable number of rows in it. Notice the empty template below:
As you can see, the original designer decided that the minimum number of preconfigured rows should be TWO. This design decision probably makes sense in an interactive environment. Let's say we need 3 rows. In order not to break anything one row is added between rows 15 and 16. Row 18 is shifted down but must importantly, its contents are updated accordingly.
I am working on a new, simplified template and am trying to keep only one preconfigured row (15). Row 16 (preconfigured Item No. 2) was removed from the template. This is what happens at run time: All additional rows under it are fine BUT the row with the totals (18) is not updated.
Perhaps the empty row (17) breaks the continuity and Excel gets lost?
Is this "sandwich" style required for a template?
TIA
Addendum: The formula in cell J18 is: =SUM(J15:J16). With the sandwich approach, the second argument becomes J17, J18, J19, J20, ... as my app adds new rows.
I've tried several VLookup strings and couldn't get it. Apologize in advance if this has been covered but spent hour and half looking/trying.
I have 2 inventory sheets. Columns 1-2 are identical on each (part #, Description). Column 3 has the inventory count for each period. I'd like to put them on one sheet with data lining up across rows. Problem is the #s aren't in same order on each sheet. Tried copy/paste and sort by Part#, then Part # but they don't match for some reason. Thank you so much. Chris.
Part # Description Count Part # Description Count
29169 SERIAL NUMBERL 300 50001E Impulse Finger 7,234
50010 Air Reject Bae 45 72000-S Chromax HD Ill 28
Name your value ranges as "Inventory1" and "Inventory2"
Go to Data>From Other Sources>From Microsoft Query
Then, select excel files, navigate to your workbook, and select both your ranges into the selection box.
Go into your Microsoft Query, and click the SQL button.
Select Inventory1.PartNum, Inventory1.Description, Inventory1.Count
FROM C:\$\Inventory1 C:\$\Inventory1
UNION ALL
Select Inventory2.PartNum, Inventory2.Description, Inventory2.Count
FROM C:\$\Inventory2 C:\$\Inventory2
Basically, this query will join your two ranges on top of each other based on the columns in the respective query (i.e: Partnum on Partnum).
Many times, I am required to provide some type of break-down to the customers - an example is shown in the attached figure.
I have a table of data ("TABLE DATA" - which is some type of pivot) + Customer provides its official form, its structure must be preserved (highlighted in yellow ). Basically, I need to separate the cost details of CODE "A" and CODE "B" into 2 separated sections.
Customer requires me to provided details for each individual Part (example shows Part A - "Break-Down Part A)
Is there anyway to put a"ITEM" from "TABLE DATA" into Code A and Code B ? the rests can be solved by Vlookup (Price, Quantity) - note: "ITEM" is non-duplicated values . Thank you very much
Number your rows in the breakout using =1 and =A1+1 and then just use the formula ="B-ITEM"&TEXT(A1,"000"). If you want to skip making a counter column you could use ="B-ITEM"&TEXT(ROW()-1,"000") to just use the current row number (minus 1 or however many you need).
If your items aren't sequentially like that, but still unique, I would recommend adding counters on the original tab similar to what you have, which would let you quickly find the 5th A or 7th B, something that counts the previous instances of your current type, and then adds 1. For Row 6 you could do =COUNTIF(A$1:A5,A6)+1.
as cliche as it sounds, long time reader, first time poster. I'm currently helping a family member out with some work and he has to sort through several thousand records and slightly change the format, obviously without some sort of automation it would take tens of hours and he asked me if I could help do it quickly. At first I thought I could, but I'm a little over my head with some of this stuff.
Basically, he has this data in this type of format:
Sample No
1 Ag 20
1 Au 50
1 Cu 80
2 AG 1
2 Au 30
3 Cu 30
But we need the data like this:
Sample No. Ag Au Cu
1 20 50 80
2 1 30 -
3 - - 30
At first I thought I could do it with a formula to move the data horizontally. The only problem is the missing data would preferably be filled with a '-', but in the original data given they are just left out entirely, so Im assuming I'll need VBA.
Sorry if I left anything out, but any pointers in the right direction with VBA would be incredibly handy.
Thanks
EDIT: Fixed formatting and had two numbers switched, sorry guys.
You can use Pivot Tables for this.
Assuming your data is currently in a single column, you can do the following:
Data menu > Text To Columns, split on a space
With your three new columns, insert a row into A1
Give your three columns captions, such as Sample, Element and Size
Highlight your entire range, and select Data menu > Pivot Table and PivotChart report...
Select "Microsoft Office Excel list or database", and press "Next"
Select "New Worksheet" if you want the data in a new worksheet
From here, drop your Sample element into the left side of the table, the Element element into the top side of the table, and the Size element into the middle of the table.
You won't have dashes for your missing data, but this should do what you want.