If Macro Picking Up 5 Inputs Changing To 3 Outputs

Sep 11, 2012

I'm trying to take 5 inputs that are all in text format and inputs have fixed options what i need is a macro that will take them and turn them in to the relevant outputs. there is a select amount of combinations and i've been asked to do each combination as a separate macro or sub macro.

What I have so far is;

If C6 = "Panel plate" And D6 = "24 by 21" And E6 = "<1.59" And F6 = "N/A " Then I6 = "120" And j6 = "4" And L6 = "120"
End Sub

6 Panel plate 24 by 21 <1.59 N/A

(Doesn't seem to work)...

If those four cell match up then i need I6-L6 to line up with whats required.
If they don't equal that i need it to stay clear.

I also need to add the same macro with different options.

View 7 Replies


Search With Multiple Inputs/Outputs

Jun 2, 2008

I am looking to create an excel search with two input and three output values on Sheet 1 that will link to a table on Sheet 2. To help illustrate:

Sheet 1:

The two white cells indicate the two input values, and the three blue cells indicate the three desired output values.

Sheet 2:

I want to enter the two input values (Length and Width), press the "Search" button, and have the corresponding output values (DWG#, Item #, and Tooling #) from Sheet 2 appear in the three output cells on Sheet 1.

View 9 Replies View Related

Description Outputs And Inputs Cells In Workbook

Feb 1, 2014

I have a small problem here with my worksheet. In my college i need to make a project about sales in a wooden floor shop.

I have done one part of work but actually i'm stuck at the specifications of my sheets.

What I need to do i added the screenshot with design Screenshot 2014-02-02 01.29.03.png

For my project i need to describe everything in my workbook as you can see in screenshot, i have made some notes but i'm note sure if its really right my teacher don't want or can't explain me well this part of work, i don't know why...

Now the question> i would ask some nice people if they can check my sheets and show me where i need to put inputs and outputs notes in the design sheet. Also in the screenshot I surrounded a part with red line there is a very strange thing no one know what is it 3 teacher telling different things.

View 1 Replies View Related

Nested Logic To Get 6 Outputs From 3x2 Matrix Of Inputs

Feb 12, 2009

I'm having a mental block with what should be some reasonably simple nested logic. Basically I've got 3 possible inputs in one field and 2 in another, and want to get 6 possible results out the other end. The sheet attached shows what i'm putting in (columns A and B) and what i'd like to get out the other end (C). The formula i need in column C is a bunch of AND's that i somehow keep getting wrong

View 5 Replies View Related

How To Find Least Inputs For Specific Amount Of Outputs

Feb 14, 2014

How can excel find the least amount of inputs needed to produce a specified amount of outputs? To boil it down to the basics:

100 units of x
200 units of y

From a combination of=

item A that yields 25 units of x and 5 units of y

item B that yields 10 units of x and 15 units of y

Objective = minimize the number of items A & B used (i.e. minimum of (item A)*(item B))

View 7 Replies View Related

If Else Syntax: Change Some Outputs Of The Macro Without Changing The Syntax

Jul 19, 2006

Im writting a macro. It works find until a certain point. When I want to change some outputs of the macro without changing the syntax, it display an error mesage while runing the macro. It says Else without If. Which is quite disturbing because the Else was not creating any problem before. Here is my macro before I changed the conditions (this one work nicely)

Sub Copy_Sheet_Beta()
Set wba = ActiveWorkbook
On Error Resume Next
If IsWorkbookOpened("Projekt.xls", "C:Documents and SettingsfrederikSkrivebordRedd Barna") Then
Workbooks("Projekt.xls").Activate 'In case open, just activate "Projekt"
Workbooks.Open Filename:="C:Documents and SettingsfrederikSkrivebordRedd Barnaprojekt.xls"
End If
Set wb = Workbooks("Projekt.xls")
If Not SheetExists(wba.ActiveSheet. Range("C1").Value) Then
MsgBox "overall doesn't exist!"

View 2 Replies View Related

Record Calculated Value Before Changing Inputs?

Jul 11, 2014

A1 = 5
A2 = 7
A3 = A1+A2 = 12

Now I would like to keep value of A3 in cell A7 every time I change input values in A1 and A2 and so on.

A1 = 15
A2 = 8
A3 = 15+8 = 23
A7 = 12

And when an input in A3 > 100, it will popup a message, that a total cannot over 100. My code:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Row = 1 And Target.Column = 3 Then

Range("A7").Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Range("A3").Value = Range("A7").Value
Exit Sub
If Range("A3").Value > 100 Then MsgBox "Total exceed 100. Check you inputs!"
End If
End Sub

View 5 Replies View Related

Automatically Updating Chart With Changing Inputs In VBA?

Feb 12, 2013

VBA code that would update a chart automatically as you change the inputs which are located in cells in excel. The inputs are located in cells B5:B9 and i want a code so that as you change these numbers the chart would automatically update.

View 1 Replies View Related

Changing Fill Colour Of Cells Based On Other Cell Inputs

Jun 20, 2014

I have a calendar set up with dates going along P6:CU6. Column C9:C27 has various status' for the job such as "Complete" or "In Progress" etc. Next to that in rows D and E I have start and end dates for the job. What I am trying to do is change the fill colour of the empty cells that are in line with each job, so that between the correct dates they are the corresponding colour to the status. So a complete job on row 9 that started on 26/05/14 and finished on 28/05/14 would have three green cells along Q9, R9, and S9.

I have tried an IF/AND/OR statement which looks like this:

=IF(AND(Q6>=D9,Q6<=E9),OR(IF(C9="Planned","P",""),IF(C9="In Progress","IP",""),IF(C9="Late","L",""),IF(C9="Complete","C","")),"")

I am getting a #VALUE! data type error, I have tried reformatting the cells to various date formats but no luck so far. This could be because my dates are set up as =P6+1 etc. but I am not sure. The error only occurs when the cell falls within the dates, otherwise it remains blank.

I intend to hide the value in the cell and use conditional formatting to change the cell colour based on the hidden input.

Once this is working I also need to take weekends into account, column G has any 2 value combination of Y and N to say whether the employee is working Saturday, Sunday or both. Row 7 has a "1" value underneath every Saturday and a "2" underneath every Sunday. I can imagine how this would work but combining it with the above formula could be complicated.

View 1 Replies View Related

Running Calculation X Times With Changing Inputs And Placing Of Output Into Cells

Jan 28, 2014

I have a cell in sheet1 (say, B2) in which I can key a date. Once I change that date, cell C10 updates (after I hit F9 to recalculate) with a new number based on the new date.

I have a list of dates on another sheet, from 1/1/2009 to 12/31/2013, all in column B. I want to produce VBA code that will run through each day, 1/1/2009 to 12/31/2009, in sheet1 cell B2 and take the output in C10 and place it next to each day in column B until it reaches the end (12/31/2013). I know this is possible but for some reason am having trouble coming up with the right looping mechanism.

You can imagine if I had to manually key in each day to get the desired output how tedious that would be.

View 3 Replies View Related

Macro That Filters Data Then Outputs It Into Another Worksheet

Jun 23, 2014

I am working on a complicated macro. The macro is suppose to move certain data set to a specific worksheet if an if statement is "True."

As of now the macro, inserts the row into a new sheet but it is inserted into Row 1. My data set is in Sheet A is up to Column U and I want it to be inserted in Column B on Sheet B. The code below inserts the entire row into Sheet B starting with column a.

[Code] ........

This variation of the code moves the entire data set from Sheet A to Sheet B and inserts it in Column B as wanted, but it does NOT follow the Criteria of "true", it brings the entire data set even those with "False".

[Code] ..........

View 1 Replies View Related

User Inputs Area Into Macro And Macro Continues To Run After Input

Oct 9, 2012

I have recorded the following marco and it works fine. I would like to modify it so the user would highlight a range of cells rather than have the fixed area :


What code lines would need to be added?

Application.Goto Reference:="R4C5"
ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
Array("'ConsExecProp@20120920'!R4C5:R113C21"), Version:=xlPivotTableVersion12 _


View 4 Replies View Related

Macro For Picking Out Trends In Data

Dec 21, 2011

I am trying to write a macro that will automate the process of selecting rows from a data sheet. I want the rows to be selected based on the values in two columns. I want to find and select the row at the beginning and end of positions in a column where the values are equal. For a quick example, if my data looks like this below, I'd want to select the entire row for rows 2,3, and 6... I also need the row just before the value in both columns are equal.

row column11 column12
1 0 1
2 0 1
3 1 1
4 1 1
5 1 1
6 1 1
7 0 1
8 0 1

I have written this macro and it is not working... are there any obvious problems with this? This is new to me and I'm not exactly sure that I've used the correct commands. It also seems like LastRow is referencing 0 and not 12965 or whatever the last row of filled data is for the sheet.

Sub Deltadata()
Dim RowNum As Long, LastRow As Long
LastRow = Range("A" & Rows.Count).End(xlUp).Row
'Finds last filled row (should be 12965)

For RowNum = 3 To LastRow Step 1

[Code] ........

View 4 Replies View Related

Filldown Macro For 2 Sets Of Inputs

Oct 8, 2008

I am currently using this macro to fill down cells full of numbers which have been passed through formulae. It works for one input (C10), however I want it to work for another input (C11). Im trying to make it fill down the cells after a new set of headings identical to row 12. It has to take into account the rows used for the original fill down which relies on C10. I have tried to use the same macro twice, but I cant get it to do both layers. Basically I need a fill down of layer 1 (already done), and then a fill down for layer 2 after layer 1.

View 2 Replies View Related

Macro Prompts And User Inputs

Jul 20, 2009

I am not new to excel - but I have never required the use of advanced excel features before today - so I apologize in advance. I am a health professional student (graduate level) assisting my preceptor in developing patient management mechanisms.

I am building an excel spreadsheet to manage current medications for several patients.

I have built the spreadsheet with the first 'sheet' being a directory and subsequent sheets being patient data files(one sheet per patient).

I am now in the process of creating a macro to build new patient data files (a new sheet for a new patient). I recorded a macro to build the new sheet with the proper formatting of information. What I am trying to do now is automate the naming and linking of the new sheet.

What I am really after is how can you create a "prompt" such that after activating the macro button it asks:

Patient last name:
Patient first name:

Then uses this data to:

1. Rename the newly made sheet to 'last, first'
2. Title the newly made sheet with 'last, first'
3. Create an entry in the directory in the 'last, first' format
4. Finally, build the hyperlink from the directory to the newly created sheet

View 11 Replies View Related

VBA Macro To Take List Of Multiple Inputs / Apply To Another Spreadsheet And Return

Sep 22, 2013

I want to create a macro to take multiple inputs from sheet 2, apply them simultaneously to the inputs on sheet 1, take sheet 1's output and list next to the inputs on sheet 2. I want to apply this to a spreadsheet with complicated calculations. Example spreadsheet attached. Related Macros I have will do a similar thing but only take one input at a time. Code as follows.

Sub x()
Dim r As Range
With Sheet2
For Each r In .Range("A2", .Range("A2").End(xlDown))
Sheet1.Range("A2") = r
r.Offset(, 2).Resize(, 3).Value = Sheet1.Range("C2:E2").Value
Next r
End With
End Sub

View 5 Replies View Related

Recognize Value And Generate Outputs

Jul 5, 2009

The issue: Theres about 300 rows of data arranged in multiple columns. One column has a dollar amount and another column has a code. Data gets entered into the sheet periodically so every new dollar amount needs to be transferred to another sheet by recognizing the right code.

What I want to do: I want excel to recognize the dollar amount and attribute it to the code in the same row. Then sum and transfer that amount to another sheet and if possible add it to an existing amount the in the correct cell.

The final outcome should be that any user of the document can just copy and paste data into one sheet and the document automatically generates the costs in another sheet. And if possible every dollar amount should be linked to a code so a user can just click on the amount and see where it came from and under what code it falls under.

View 5 Replies View Related

Random Generator With Several Outputs

Feb 14, 2007

I need a formula to create random letters down a column: A-F. Probability of A=3%, B=6%, C=8%, D=11%, E=14%, F=16%. I've got it worked out to where each letter is a header of a column ("A" is in A1, "B" is in B1, etc.). My question is: how do I consolidate that in one column, so that, "A" for example, reads ABFCBACFBFBECEABCEABCEAFBCEFBCAFEBCFAEBFC...? I'm using the random number generator for the 6 columns...thx

View 5 Replies View Related

Multiply Outputs Of Multiple If Statements?

Apr 8, 2014

I need to multiply the result of the 3 if statements as shown below in one cell Each of these 3 if statements output an integer and I need to multiply the value of each of these 3 output integers to get the final output integer. syntax of multiplying if statements outputting an integer?




View 4 Replies View Related

Multiple Outputs For Single Lookup Value

Feb 4, 2014

On one of the reports which i am doing to identify the series of values for a single input data. In the attached spreadsheet there are 2 tables, table 1 has complete data with column a is the lookup value and column b is output value

I have to fill the table 2 in the same manner as shown in the attached template. there could be many different for a single lookup value but i am targeting to look for the 1st 9 matches and last matched value. eg. if i am looking for the value 9 which has 15 different values i want to display the 1st 9 matches (p,q,r,s,t,u,v,w,x and ad - being the 15th match)

Not sure whether this could be possible by using formulas?

View 5 Replies View Related

Multiselect Listbox Output And Other Userform Outputs

Nov 2, 2012

I have a userform with 5 data fields. The first two are listboxes and the last 3 are textboxes. I have recently added the multiselect option to ONLY THE FIRST listbox (MeetingSpaceBox). I can get the multiselect listbox to output correctly. The problem is, though, that the rest of the data will only fill in the first row and will not be added to any of the subsequent rows. The data from the other 4 fields should remain constant for each selection in the first ListBox or at least until either "ok" or "clear" have been selected on the UserForm.

Do I assign all those valuables to variables and fill them in after the Multiselect listbox data has been added? I assume this will mean a change (or deletion) of the emptyRow code.

See my code below

Private Sub CalcButton_Click()
If AllDataEntered Then
'define empty row
emptyRow1 = WorksheetFunction.CountA(Range("A:A")) + 1

[Code] .....

View 4 Replies View Related

Using List Function With Hiding Irrelevant Outputs

Feb 12, 2009

I am in a fix on how to create a formula where the user can drive the outputs by selecting specific timeframe (placeholder Cell add: C3 on worksheet named Staff Number Calculation).

Based on this selection, the output should be calculated in address C9:H25, now where I am getting stuck is referencing as this output is based on values present in worksheet named "Volumes" and "Time Spent Per Unit".

However, as volumes vary by each month, the number od workers required should also be reflective of changing in volumes worked upon.

For example: ...

View 14 Replies View Related

Collect Model Outputs Into Summary Table?

Feb 12, 2013

I have a question around making a summary table from a model. I will try to explain this as plainly as possible.

I have a model where you can toggle 3 different inputs across two variables. The final output number of the model will vary accordingly.

I would like to create a 3X3 table with the final output for each combination of variables. Is there a way of doing this using formulas or would I need a macro?

View 2 Replies View Related

Limit Decimal Outputs In A Userform Textbox

May 7, 2007

I have a textbox on a userform.

The textbox is populated with a number which is generated by a formula which is
the result of a "Select Case" module.

On some occasions, for instance when dividing 1000 by 3, I get a result with recurring decimals in this case 33.333333333.

Is it possible to make the "result" round to the nearest whole number?
The textbox is named "inDorW".

View 8 Replies View Related

Align 2 Tables, Match Two Outputs From A Database

Dec 21, 2007

My goal is to match two outputs from a database so that the same person's record can be found on one row. At present output 2 does not marry up to output 1 due to staff leaving and new appointments being made. The data in output 1 should remain static. The data in output 2 must be manipulated to match the order of output 1.

Output 1 is a 5 column record containing (in A6:E6)

Forename, Surname, Branch, Roll Number, and a % score

Output 2 is again a 5 column record containing (in G6:K6)

Forename, Surname, Branch, Roll Number, and a % score

Each employee can be identified by a unique Roll Number Code contained in the fourth column of each record.
If an ideal match has been found I'd like the letter Y to be inserted in the L column of each record to signify a positive comparison. All non matches should have the letter N in the L column & these non matches should be placed at the bottom of the dataset.

View 2 Replies View Related

Refresh Input Cell And Capture All Outputs From Each Loop

Jul 10, 2014

Assuming I have three worksheets:

1) input: col A has a series of product code (string)
2) calculation: where I want to automatically copy and paste each product code from "input" worksheet into "calculation" cell B4, and through many steps of calculations, return the outputs in cell B8 and B9 (parameters are numeric)
3) output: how to automatically record B8 and B9 from "calculation" sheet to this sheet Row 5 and 6 from each loop? (format of output doesn't really matters)

View 4 Replies View Related

Arranging Outputs: Pulls The Weather For Today Into Cell A1, And The Forecasts For The Following 3 Days Are In A4, A9, Then A19

Feb 10, 2007

The weather data I receive from a web query pulls data in oddly. For example, some days it pulls the weather for today into cell A1, and the forecasts for the following 3 days are in A4, A9, then A19. The cells in between are blank, and the problem is that it pulls it in randomly otherwise I could just have the cells reference it (ex. some days it pulls it into A2, A8, etc) What I need to do is arrange it, in order, without the blank rows, but I want to do this without deleting the rows.

View 4 Replies View Related

Picking Data Out Of Different Columns?

Apr 2, 2014

The purpose of the attached workbook is to calculate the average number of days a customer takes to pay their invoices. There are two tabs - Invoices and Payments. I am trying to calculate the number of days between Invoices "Sales Date" and Payments "Settlement Date".

The Payments tab is raw data exported from Attache financial system as CSV. It is the best I can get out of the system but the columns are all over the place.

I thought maybe from the Invoices tab I could search a row on the Payments tab to match the invoice number, find the cell containing the phrase "Invoice Number" then pick up the date from the following cell which contains the Settlement Date . This would be straight forward if the data from the CSV file consistently landed in the same column in the Payments worksheet, but it doesn't. As you can see, the phrase "Invoice Number" might appear in any one of several different columns.

View 5 Replies View Related

Picking Values From A Row With Blanks?

Oct 6, 2008

I work in school which for example offers 20 courses for every student. Therefore I have a spreadsheet which has students name in A and B then the 20 courses spread from C to V.

Each student will study 3, 4 or 5 of the courses and will have value in the corresponding column (their teaching group) the rest of their row will be blank.

For each student create in columns X, Y , Z, AA and AB I would like to be able to pull from the 20 courses those which the student studies. Therefore finishing up with C to V hidden and just the student names and the 3, 4 or 5 courses they study.

Any ideas? if one method is to get them into one cell how do I get them into the 5 columns; i know DATA : Text to Columns but won't have anything to Delimit it with and can't use Fixed width as students will study subjects with different length charactors.

View 6 Replies View Related

Picking One Item From Array?

May 20, 2014

I have a table, which has pairs, e.g like this:


how to give the value to variable based on this pairs? I mean something like this:

If left(mystring;1)=A, then

I used the case-structure, but maybe there is a better solution, which can use an array in order not to write all of the items whenever I need it.

View 9 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved