VBA form control to create input values - excel

I am a warehouse lead that is trying to set up a better system for keeping track of the tractor trailers I have coming in and out of the facility every day.
The way I have this spreadsheet set up currently is Column A is the Tractor Trailer numbers.
Then columns B:D are the different location they come from.
I have countif statements at the bottom of all the B:D columns to count for the value X.
I have a hidden column in F that has the following countif statement: =COUNTIF(B3:D3,"X")
and then in column E I have the following if statement:
=IF(F3=1,"","X").
Is there any way I could use VBA to make a form control automatically get an X value put into rows B:D based on matching the information in Column A with the correct facilities the tractor trailers are coming from?

You don't need the VBA accomplish this. Excel worksheet functions are made for this. If you could post a screen shot I'll try and help you out.
The two biggest problems I see is that you are calculating a lot of blank cells. Also try and avoid overlapping formulas.
You would make your life a whole hell of a lot easier if you'd watch 4 or 5 videos on Excel a week. ExcelIsFun is a great free resource. His video are 5mins to about 20 minutes. In a month your co-workers will be asking you for help.

Related

EXCEL: Countifs statement that uses cell values as criteria

I have been banging my head against a wall for a few days with trying to make a COUNTIFS formula pick up four variables that may or may not be included in the criteria depending on what the user is wanting numbers on.
I have a front sheet where I want to show the number of unique events by a geographical area depending on the risks selected in the checkboxes in column F. There are some events that have more than one risk attributed to it so if only Risk-C was selected then all events with Risk-C flagged as Yes in the data set should be counted in the COUNTIFS in column B of the front sheet.
If an event has Risk-C and Risk-M flagged as "Yes" in the Data Set then they need to be counted even if only the Risk-C checkbox is ticked in the Front Sheet. This is what I'm struggling with at the minute.
Could someone please have a look at the attached screenshots and offer any pointers as to what I need to do to include the Checkboxes or True/False statements as part of the COUNTIF criteria? Or is there an alternative formula / function I need to look at? I use Excel 2016.
Many thanks in advance for anyone able to help me!
Andy
Front Sheet
Data Set

Excel - Checking Values of Cells Across Sheet

I have a spreadsheet that provides monthly results for the last year. The layout is 7 columns per month, each column is the same information for each month (count and rate of various things).
I need to trigger a true/false based on both count and rate being above threshold values in any of the twelve months.
I can do this using either nested IFs or just a lot of IF statements, but was wondering if anyone has a better suggestion? I am open to formulas or VBA, whatever would be most robust.
Image of how each month is arranged
It's a little hard to tell from your spreadsheet what the layout is, but I tried to recreate it (See image below). I entered the function =IF(OR(B2>0.04,C2>2),$A$2) into cell A7 and dragged it across the spreadsheet. All the values you're looking for should be under the Month column. To prevent the function from changing its reference to the first column Name, I used absolute referencing, with dollar symbols $A$2. This way you don't have to keep changing it back to the specified column. Hope this helps.

Conditional formatting in Sheets - formatting two cells based on one

I'm working on a personal budget spreadsheet, and I have a tab that calculates what I've spent so far in certain categories and compares that total to what I have budgeted for. I have one column showing how much I've spent and the one next to it shows how much I have left to spend. What I want to do is highlight both the total and the amount left if the column showing the difference is negative. I want to do this for the whole 2 columns. Here is a link to my sheet:
https://docs.google.com/spreadsheets/d/1AXaxVpVpblxwnS7VBhz4yhz1SNXRGCB6Zrb3OIKiaKk/edit?usp=sharing
I think my main challenge is highlighting both cells dependent on only one of them. I've tried some custom formulas but they don't seem to work. I know there has to be a way to do this. Any ideas?
You just need to fix the custom formula with a $ and apply it to G6:H26 so that when it is applied to column G it still checks column H:-
=$H6<0
Hope that helps

inventory management with excel

My previous post seemed to have been unclear so I am posting this again and will try to explain the problem more clearly using screenshots.
https://www.dropbox.com/s/4x8wktbdo7jc21m/excel-screenshot.jpg?dl=0
Now, let me explain the screenshots.
Let's take just one of the raw materials in the table, say Rosin (Column B).
Whenever we buy more rosin, I mention the quanity bought and the date(Column A)
and I have the total quantity of rosin bought at the bottom using the formula "=sum(b80:b91)".
You will also notice that the number of rows at present is 11 i.e. 80 to 91.
But we will still be buying more rosin, even when I have entered the data in these rows. i.e. when I enter the dates and the quantity bought.
The problem is that I'll have to keep inserting more rows in there after every few days.
And if I keep doing that then the column for Rosin(as well as for the other raw materials) will become so long that I'll be scrolling forever.
So, is there a way that I could just enter the amount of rosin bought and the date without having to insert more rows.
Here's a link to the excel sheet that I created - https://www.dropbox.com/s/iod5y7jae6grmyz/brc%20goods%20received%20STOCK11.xlsx?dl=0
If you think MS Excel is not the right tool for this, then please recommend the correct tool for this.
I was learning some python and know some programming basics - just for your information.
P.S. Hope I have been able to explain the problem clearly this time.
I admit that the excel sheet looks very confusing and haphazardly done, but I wanted to start doing the calculations and improve the looks of the sheet later on.
basically, you need to use pivot tables to organize and sum your data.
here is an example sheet done for you to illustrate how it is done in your case.
therefore, you need to put each distinct data type in different sheets. In my example, I have put all of the incoming chemicals into one sheet and created a pivot table for it in another sheet. you need to repeat this for chemicals used in a separate sheet, and create a pivot table in the same/separaate sheet. And finally, in another sheet, you can make a table of total chemicals at present, simply by refering to the data in your pivots tables.
Every time you update your data sheets, come back to its pivot table and click refresh to get the latest and update your data across the table.
you can look up some help across tutorial sites on how to create a pivot table, here is one from microsoft
the best solution here would be not to keep multiple tables which you plan to extend on the same sheet, i looked at your file and it is way too confusing and clogged up, separate all the datasets you have into separate sheets, give good descriptive names to these sheets. I noticed you use total rows below each dataset, what you can do(as long as you are in Excel 2007+), create the dataset and then format it as a table from the menu, which makes your data a lot easier to read and handle, it also gives you the option of total row, more to read up on these tables you can here: Format an Excel table

Return all cell values in a row if Month & Year match a dd/mm/yyyy formatted date cell in that row

This is possibly a tough one so forgive me while I spell out the exact circumstances and what is needed:
We have a workbook which is populated with data from our support calls (most of it is text) which is then analysed for certain criteria which are just Yes/No options (i.e. incorrect information received, late notice, etc). One of the columns is the date the support call was raised, formatted as dd/mm/yyyy. All of this data is on sheet 2.
What I have been asked to do is to have a management-friendly interface on sheet 1:
two boxes on sheet 1 labelled 'Month' and 'Year' - a manager can enter say January in Month and 2014 in Year and if they match the dd/mm/yyyy of any calls which were raised, this will then extract the whole row of values and place on sheet 3.
On sheet 1, a graph will then be populated from the data on sheet 3 to show things like how many support calls had incorrect information.
Any ideas? I've tried going through VLOOKUPS, MATCH and INDEX and can't find anything which makes any sense to me.
UPDATE
Thanks for all the input in such a short time frame. Apologies for not providing more information first time around - was on a tight deadline and had limited time to write the original post. Many thanks to both user2140261 and Scott Gall for the hints and explanations concerning pivot tables. I think that has given me enough information to head in the right direction (I ended up having to do the first graph manually, but seem to have some promising results with my first attempts with pivot tables and charts) so thank you once again.
When I have this properly worked out, I'll post some dummy information showing how it works in case anyone with a similar problem finds it useful.
May I suggest the use of a pivot table?
First break the Date Field into multiple columns on sheet two (which do not need to be visible btw).
Formula for Month: = Text(,"mmm")
Formula for Year: = Text(,"yyyy")
Then insert a pivot table on Sheet 1 using the whole data range on sheet two as the source.
Set the two new Columns (Month and Year) as Filters and the user can simply pick a month and year to view (multi select should also be available)
You will need to play around with what to put in the rows and columns and values a bit...
Keep in mind the default "Value" calculation excel will do is Count this is rarely the desired measure for the "Values" usually want SUM.. this can be changed by clicking the small down arrow for the value field and editing the field properties.
Note your graph can then be fed from the resulting pivot table.
Hope you find this helpful... if so please vote up.

Resources