Create A Macro That Find And Calculate Based On Details Of 4 Columns On Same Spreadsheet
Jul 21, 2012
create a macro that will find and calculate based on the details of 4 columns on the same spreadsheet.
Basically, here is what I need to do:
1. Need to calculate how many QTY IN (Column F) and PALLETS IN (Column I) of a specific PART# (Column A) and LOT CODE (Column B) For example if enter a PART # and LOT CODE, it will calculate how many QTY IN and PALLET IN of that PART # and LOT CODE.
2. Need to do the same for QTY OUT (Column G) and PALLETS OUT (Column J) also.
3. Output should contain the PALLET # , QTY IN and PALLETS IN based on the PART # and LOT CODE search. I just want to simplify the search function in this spreadsheet because it is very cumbersome if you need to find how many items left for that PART # and LOT CODE.
Attached is the spreadsheet..
View 9 Replies
ADVERTISEMENT
Aug 7, 2008
I am trying to create a spreadsheet to calculate the macro nutrient ratio of foods based on carbohydrates, proteins, and fats and how many units/servings I eat of each. I've attached the file I've started. It's fairly straightforward and simple, thus far.
I would like to be able to associate a food with its various nutritional data in its row (fat, carbs, sugar, fiber, sat. fats, protein.. etc.). With all of my food items entered, I would like to be able to choose from a list, have it prompt me for how many units I've eaten then plug it into my formula to calculate totals and ratios.. The final flow should go soemthing like this...
1. Select a food from a list (each food on the list has its associated characteristics)..
2. Select how much ( each food will have an associated serving size i.e. 1/2 cup, 1oz..) ---- (4) oz VS. entering each unit in A1
3. Make these totals of each characteristic feed into my final chart with which to track and graph.
View 4 Replies
View Related
Jan 15, 2009
I'd like to create a button that makes the "Find and Replace" popup come up when pressed. How to do this? (Ctrl + F is the shortcut for it)
View 3 Replies
View Related
Mar 5, 2014
I need to set up an easy to use spread sheet for my office. It needs to be able to calculate the running total spent of fuel, as well as include any discounts we get and then calculate our total savings.So basically, total spent and total saved.
View 3 Replies
View Related
Jul 6, 2007
I have a work sheet(sheet1) that contains 700 people's information. Each row contains information for one person. Let's call the first person A. I have to copy certain columns of person A's response to another work sheet(sheet3) in the same file. Then, copy person A's e-mail address and save the sheet as person A's e-mail. Repeat the same steps for the next respondent.
I have created the macro for person A already (including the saving part). Now the question is how to write the loop in the macro.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 7/5/2007 by Jean Kuo
'
'
Range("Q4").Select
ActiveCell.FormulaR1C1 = "=Sheet1!R[-2]C[-4]"
Range("Q13").Select
ActiveCell.FormulaR1C1 = "=Sheet2!R[-9]C[-14]"
Range("Q14").Select
Sheets("Sheet2").Select
Range("D4").Select
Sheets("Sheet3").Select
Range("Q14").Select
Sheets("Sheet2").Select
Range("D4").Select
ActiveCell.FormulaR1C1 = ""
Range("C4").Select
Selection.Copy
Range("D4").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=Sheet1!R[-2]C17"
Range("C4").Select
Sheets("Sheet1").Select
Range("T1").Select
Sheets("Sheet3").Select
ActiveCell.FormulaR1C1 = "=Sheet2!R[-10]C[-13]"
Range("Q15").Select
ActiveCell.FormulaR1C1 = "=Sheet2!R[-11]C[-12]"
Range("Q16").Select
ActiveCell.FormulaR1C1 = "=Sheet2!R[-12]C[-11]"
Range("Q17").Select
Sheets("Sheet2").Select
Range("F4").Select
Sheets("Sheet2").Select
Range("G5").Select
Sheets("Sheet3").Select
Range("Q17").Select
ActiveCell.FormulaR1C1 = "=Sheet2!R[-13]C[-10]"
Range("Q22").Select
ActiveCell.FormulaR1C1 = "=Sheet1!R[-20]C[42]"
Range("Q22").Select
Selection.Copy ...
View 3 Replies
View Related
Jan 27, 2010
How do I create VBA macro to create CSV files out of Excel spread sheet for each tab? Right now I am manually opening the spreadsheet and saving each tab as CSV file. But it is taking lot of time if we have lot of tabs.
View 14 Replies
View Related
Jul 20, 2014
I am trying to create a workload spread sheet for work I need to have the same looking spread sheet 365 times but also need each sheet to be dated, EG (tue,01/04/2014 through to tue,31/03/2015) I can create 365 tabs that have the same spread sheet on and I can create dates but not do both at the same time, it isn't fun doing copy and paste 365 time.
View 1 Replies
View Related
Sep 29, 2013
I am trying to create a macro to insert monthly P&L figures into a spreadsheet.
I am needing the macro to insert a column to the left of a column titled 'movement' each month and copy&paste my monthly figures in.
I have recorded the below macro but my inserted column is always moving into column E and pushing the prior month to the right, where I need it to always be situated to the immediate left of the movement column, e.g. if the macro is inserting September P&L data I need it to be situated between August data (currently in column E and movement data currently in row F and so on.
Column C D E FItem
July
August
Movement
Fees
26,500
28,000
2,000
Assets Ongoing
150,000
160,000
10,000
Columns("E:E").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("P&L Current Month").Select
Range("D11:D127").Select
[Code] ...
View 1 Replies
View Related
Feb 3, 2009
In excel, is there anyway to find the details(history) of the previously deleted rows (using vba or anyother way)?
View 9 Replies
View Related
Nov 27, 2007
I am really stumped at this particular point in my coding. What I am trying to do is to have a user input an ID number. When they click OK, I want to find the ID number and then subtract 1 from a number that is 13 columns over. So if the ID number is "123456789" and that matches the value in A3, I want to subtract 1 from the amount in M3 (leaving the new value in cell M3). So, if M3 was 30, now it would be 29.
View 2 Replies
View Related
Apr 15, 2008
I have a spreadsheet with 28 columns. I need some column headings to be amended when I run a macro and I also need some columns deleted.
View 9 Replies
View Related
Oct 18, 2006
I'm in need to split 1 column (address details) into several columns (for ex. address, city, postcode, country) I can't use the "Text to Column" function as some address will split into 5 part, some split into 6/7/8. Is there any way I could do this automatically as there're a lot of entries in my spreadsheet. Example of the data need to be split attached.
View 5 Replies
View Related
Nov 4, 2008
I have a speadsheet that has a table containing scores of audits, in the last 3 columns of the tabe I have the two totals (columns AC and AD)
In Column "AF" I wish to show where they will rank based on the results, first I need to rank via the result of column AD and if that is the same as another result use column AC to determine where they rank.
View 9 Replies
View Related
Feb 21, 2008
On Pipe worksheet, pipe numbers 1-203 are listed in column A. Each pipe number has a flow rate that is listed in column E. I need it to look up the pipe number in column A on the Job worksheet and report the flow rate (from the Pipe worksheet) in column D for each pipe.
View 5 Replies
View Related
Jan 13, 2014
I am trying to create a formula that is able to calculate an end result based on the cell contents of 3 columns, the results are predefined in 3 other columns, here D, E & F
For example:
Column A Column B Column C Column D Column E Column F Column G (Results)
Royal Mail 1 100 2.8 2.3 1.2
Royal Mail 2 100 2.9 2.4 1.3
Royal Mail 3 100 3.0 2.5 1.4
DPD 5 200 4.5 2.8 1.5
DPOST 1 100 1.2 3.2 1.7
I am trying to create a calculation that in Column G will work out, IF Column A=Royal Mail AND Column B=1 AND Column C<=100 THEN Answer is [@[Column F]], IF Column A=Royal Mail AND Column B=2 AND Column C<=100 THEN Answer is [@[Column F]], IF Column A=Royal Mail AND Column B=3 AND Column C<=100 THEN [@[Column F]], IF Column A=DPD AND Column B=5 AND Column C<=200 THEN [@[Column E]], IF Column A=DPOST AND Column B=1 AND Column C<=100 THEN [@[Column D]]
Here are an example of what I have tried, amongst many...
=IF(AND(AND([@[Default Post Postal Service]]="Royal Mail"),AND([@[Default Postal Format]]=1),AND([@Weight]<=100)),1,0) Everything is zero.
View 4 Replies
View Related
Aug 1, 2014
It's probably best if you open up the attached example spreadsheet that contains sheets "Before" and "After" otherwise it might be pretty difficult to understand what I'm talking about.
So I have this spreadsheet where I have part numbers in column B, status of the orders in Column I and lead times in Column M. What I want to achieve is to get of Mode (col N), Median (col O) and Average (Col P) values of each part number and each of its status using the lead times in Column M. If possible I would only like this on the top lines of each of these. I have done the formulas manually on sheet After so if you click on the formula you can see the range's it covers.
I did create a concatenation in column K (conc of column B and I) as helper column because in theory this might make things a little bit easier.
Now going into second part. I would also like to do something very similar but only using the part number and status "Finished" and get the values in columns T,U, and V on the top row of each part number. I made some blue boxes and arrows to kind of point out the idea.
The solution can be either formula based or macro, it really doesn't matter, however I will intent to use it within macro either way.
View 2 Replies
View Related
Sep 27, 2012
I have long series of data in 8 columns (B, F, J, N, R, V, Z, AD) starting at row 5 down to row 86404. I want to find the total median for each row, where a condition is met for that row. The condition is if number>10 and the number is located in row 3 for each column (i.e., B3 for column B). So, if B3, J3, R3 are all >10, then I want to find the median for all the numbers in the columns B,J,R.
I assume there is an array formula that could do this? I've tried a few solutions with no luck.
View 4 Replies
View Related
Feb 12, 2014
I am new to VB Macro creation and I am creating VB Macro which will:
1. Sort data in Columns within an active spreadsheet
2. Create new Worksheets
3. Delete Values in rows based on value in Column.
I have listed my "Step by Step" instructions in the tblTest Excel file on attachment. The instructions are clear and straight to the point.
Below are some VB Macros I was experimenting with but it is not complete.
Sub Sort_Ascending_With_Header()
'Sorts a worksheet in ascending order and assumes there are headers on the data
Range("A1:DZ20000").Sort _
[Code].....
View 2 Replies
View Related
Mar 22, 2013
If my spreadsheet has columns A-H.
A is Date
B is Room Number
C is Location
D,E,F all have numbers results in them.
G is the average of D,E,F for each person
H is group average.
If I want to define a group average in column H where it calculates the average of a group that attended the same location, date and room, for each group that attended would that be possible?
So For Example (Columns DEF left out for clarity)
Date
Rm
Location
G Inidivual Average
[Code]....
So because room number changed it calculated as a different group. Is this possible?
View 3 Replies
View Related
Nov 14, 2009
I need to create a report based on three columns. I have explained in detail about my requirement in the attached sample workbook.
I hope someone will help me to solve the problem through VBA because the items & expenses may vary at times. Hence, I feel a Macro will be the best solution.
View 14 Replies
View Related
Jul 27, 2013
[URL] ......
In that file, you can see there is a list of somewhat similar data across 5 columns. Some of the entries are duplicates, some are different by only one character. What I want to be able to do is generate a list of all the unique rows of data, taking into account the data from ALL 5 columns. The list can be on another sheet or simply just further down on the same sheet, that doesn't matter too much.
I could do it if it were just one column of data, but struggling trying to do it with several columns.
View 7 Replies
View Related
Apr 23, 2008
I have a small sheet that has a number in Column A and a larger number in Column B along with some data in Columns C and D. I wish to make a separate sheet that has rows numbered using the numerical range from Column A and Column B along with the data from Columns C & D
View 2 Replies
View Related
May 2, 2008
I have been perusing various Excel sites in hopes of finding a macro or function that can create columns based upon two dates input into specific cells. My ultimate goal is to use this macro or automated function so that when the user inputs the dates, the columns would automatically be created for them, rather than having them do it manually.
ideally, the 'start' and 'finish' dates are named cells and the macro could determine the difference between the two and automatically insert columns to the left of a ' Totals' column.
View 9 Replies
View Related
Dec 9, 2009
I was interested in getting Excel to look up details of a person say age and put the details in another table under the correct heading.
E.g. Fred Bloggs age 25
Would look like this
First Name Surname 16-24 25 - 49
Fred Bloggs 0 Tick or something
View 9 Replies
View Related
May 2, 2012
I have a column of data where the seperate entities are divided by blank rows. for example: i need to calculate sum(G3:G15) then skip the blank row (G16) and calculate the next group, say sum(G17:G50) and export that import to a new worksheet.
The issue is that the column lengths vary from day to day so the blank rows will not be in the same position.
View 2 Replies
View Related
Dec 17, 2009
I would like to create an excel program with Macros.
The program would allow me to find out which distribution a random bunch of data belongs to. For an example, Weibull Distribution, Exponential Distributions etc;
View 14 Replies
View Related
Nov 1, 2011
I have spent a good amount of time trying to create the below using botched IF functions, SUMIFS, SUMIF formulas etc.
Basically I have a sheet (called Sheet1) with the following columns:
A - Date (by individual day DD/MM/YYYY)
B - A catagory (so using the old example, Apples, Orange, Pears)
C - Price.
I would like to be able to create a formula, whereby I can sum the Total sales for each catagory across each month onto a summary sheet (sheet2).
I would use pivot tables, however am not sure how i can make all the require data appear permanently in the best way, especially if there is a one liner that can be done more easily. So far I have managed to create a sum dependent on month, but have been unable to encorporate the catagory.
View 1 Replies
View Related
May 19, 2014
I have a table which is extracted from a database using 2 tables.
1 Header and 1 details table.
I want to display the latest date in column E.
As Column A,B,C is the header table and column D,E is the details table.
Can this be done in vba or a pivot?
View 1 Replies
View Related
Oct 1, 2012
I have one workbook that needs two macros.
On the "Complete Backlog" tab of my workbook, I want users to enter in the requested information based on the column header. Then I would like a Macro attached to a button that says "Refresh" that the user would click after they have entered in all of the information. This macro should look in Column M (WIP Status) and if any of the cells say "Close", it should Cut the entire row from the spreadsheet(Ex. A2:M2) and Paste it into the speadsheet titled "Closed Jobs".
This is so that as jobs are closed/finished, they are removed and stored on a separate sheet. The items would have to be pasted so that it pastes into the next available row - not just on top of each other.
I also need another macro that i can put into a button that doesn't "delete" a row from the sheet, but just copies over to another sheet - so that there are two instances in the workbook.
If would look something like: If a cell in "Column G / Director" of the "Complete Backlog" speadsheet is equal to "Snodgress" then copy columns A-L of the same row to the spreadsheet titled "Snodgress" - of course skipping down the rows to the next blank row.
.....is equal to "Herr" copy row to "Herr" spreadsheet.
....is equal to "McCormick" copy row to "McCormick" spreadsheet.
and so on.
View 2 Replies
View Related
Jul 11, 2014
I've only done a small amount of macros with VBA.
I want to create a macro to insert 12 cells left of a column labeled "This Year" As the spreadsheet grows (by 12 columns @ year) the "This Year" column moves to the right. Thus I need to reference the range off of that column and then insert 12 columns directly to the left of it each year. Can I somehow reference the label "This Year"?
I then need to enter the month labels in the new columns row 8.
My problem is trying to reference off the "This Year" column.
View 8 Replies
View Related