Function Making Worksheet

Apr 24, 2008

I'v got a school task about making a excel worksheet.

But we have just started and i havent gotten all the functions to work yet.

The task itself is :

Make function that tests if D9 is larger then 100 and I9 is less then 50. If true "Kontroll" if not "OK" should be written.

Also, if "Kontroll" shows up it should have a dark green "OK " should just be black

Its roughly translated from norwegian. If you need some more information I will try to provide it

View 10 Replies


ADVERTISEMENT

Making A Case Function

Nov 13, 2008

i am trying to get the following function to work

i want it to look at 2 cells, depending on the number in the second cell i want it to multiply the first sell by a specific number.

for exaple (Below) function in a3 looks at a2 sees it is a 2 and multiplies a1 by 1.09 shown in the code below

A1=load
A2=factor

A1 A2 A3
100 2 Function

Function Pmax(Load, Factor) As Double
Select Case (Factor)
Case "1"
Pmax = Load
Case "2"
Pmax = Load * 1.09
Case "3"
Pmax = Load * 1.12
Case "4"

View 9 Replies View Related

Making Complicated Sumproduct Into Function?

Jul 9, 2014

So I have a rather complicated IF, Countif, Sumproduct combo in a formula right now. As you can imagine this makes my worksheet run rather slowly. I was curious if there is any way to make this formula into a User Defined Function. The formula looks like this:

[CODE]
=IF(A15="","",IF((AND(COUNTIFS(J:J,J15,AM:AM,ABS(AM15),AD:AD,AD15)>1,
(SUMPRODUCT(--($J$17:$J$10000=$J15),--($AD$17:$AD$10000=$AD15),--(ABS($BD$17:$BD$10000)
=ABS($BD15)),--($AX$17:$AX$10000=$AX15),$BD$17:$BD$10000))

[CODE]

I would not be surprised if this isn't possible but thought I would try. Another possible approach would be to make this into a macro and instead of the output being "Duplicate" or "Research" just have the "Duplicate" Cells Highlighted in Red and the "Research" Celss highlighted in yellow.

View 1 Replies View Related

Making Standard Deviation Function Dynamic

Dec 10, 2013

Basically i have a list of data for example from B2 to B2000 for which i want to calc a standard deviation across however the number of data points in the standard deviation need to be dynamic.

For example in Cell a1 i can enter 150 it will then calc the standard div across the first 150 data points (points 1 to 150) then in the cell below calculate the next standard div.

Standard Div Points10
Data PointData ListStandard div
10.167442459
20.539073451
30.29740845
40.309440859
50.640742715

[code].....

View 2 Replies View Related

Making One Worksheet Talk To Another

Dec 8, 2008

I know I posted this same topic about a week ago but I went through the first 20 pages on the forum and couldt find it, i tried the search option and nothing came up. I have several worksheets in the same workbook. When I enter a number in one cell in work sheet A, I want the same number to show up in a given cell on work sheet B. How do I do this? I can make words move from one shet to the next but numbers dont seem to be the same.

View 6 Replies View Related

Making User-defined Function Accessible To All Workbooks

Apr 16, 2002

I've got a couple of user-defined functions that I coded in via one workbook (wkb A), but would like these functions to be accessible to any workbook (wkb B...Z). How is this done so that when I start a new blank wkb I can use these user-defined functions there as well?

View 9 Replies View Related

Excel Sine Wave Graph/function Making

Feb 15, 2010

i have some numbers as data, i want to find the function that generate thiese numbers and also i want to view the chart of it, its kind of sine wave graph.

View 9 Replies View Related

Making Worksheet Active With Macro

May 12, 2006

Basically trying to make change the active worksheet using a macro code. I want the user to be able to click a button and it will automatically switch the worksheet to another within the workbook.

View 5 Replies View Related

Making Existing Code Work For Specific Worksheet/s

May 30, 2013

I would like the following code to be run for all those sheet/s that has a name = "single" (Not case sensitive neither an exact match) of my active workbook.

Code:
Sub UIUIUI()
Dim LR As Long, i As Long
LR = Range("I" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With Range("I" & i)
If .Offset(, -1).Value = 1 Then .Value = .Value & "-"
End With
Next i
End Sub

View 3 Replies View Related

Excel 2010 :: Making Worksheet Open In Full View Mode At User End

Sep 3, 2013

I'm using Excel 2010. I have a workbook with only 1 worksheet in it and it will be sent to several people. I want that excel file to open in Full View when the end user opens it. Is this possible without any VBA codes?

View 2 Replies View Related

Scoping Function As Public - But Not Available As Worksheet Function

Sep 24, 2012

I have a user defined function in one VBA module that I'd like to call from another module, so I would normaly scope it as "Public".

However, as I don't want it to be available to Excel as a worksheet function, I would also normally scope it as "Private"

Is there a way to have a function that is available to other VBA modules in the same project, but not to Excel as a worksheet function?

View 5 Replies View Related

Specifying (other) Worksheet With Function

Oct 23, 2007

This line is returning the number of the last row with data in it in column 1 for the open worksheet:

View 3 Replies View Related

Worksheet Function In VBA

Jan 20, 2009

My workbook has a sheet called "MyList", another called "HisList" , a named range called "myNamedRange" which is "MyList!A:A".

How do I get this functionality of this excel formula

View 2 Replies View Related

MATCH Worksheet Function

Dec 12, 2007

MATCH("b",{"a","b","c","b"},0) returns 2

how about if I would like to have the return result as 4 since I have another "b" within that same array?

View 14 Replies View Related

Translating Worksheet Function To VBA

May 2, 2014

I've got the following array formula :

=MAX(IF(C:C="JAMES",ROW(C:C)))

Which nicely returns me the last occurrence of the name JAMES in column C

However, how would I translate this to VBA code?

I want to find the last occurrence of a value in a column and I prefer not to loop.

View 7 Replies View Related

Using SumProduct Worksheet Function In VBA

Feb 5, 2009

I'm having a hard time figuring out how to use the SumProduct worksheet function in VBA. The below worksheet formula works: =SUMPRODUCT((accProv=D2)*(accFYE=E2)*(accAcc))

- or -

=SUMPRODUCT(--(accProv=D2),--(accFYE=E2),(accAcc))

I tried the below variations in VBA, and I keep getting run-time error 13.

View 3 Replies View Related

Worksheet Function Not Always Working?

Sep 24, 2012

I've written some code to try to count the number of cells that are not empty and save the result as a variable but sometimes the code seems to think that the cells are empty even though they are not.

The code goes through rows 1 at a time and counts the quantity of cells that are not blank and compares them with a couple other values.

The strange thing is if I execute the actual function =COUNTA(with the range that I am selecting below) the COUNTA function works properly by itself in certain problematic sections of the worksheet.

This code below seems to work correctly most of the time but I've found a few instances where it is not properly counting non-blank cells:

Range(ActiveCell.Offset(0, 8), ActiveCell.Offset(0, 27)).Select

QtyTests = WorksheetFunction.CountA(Range(ActiveCell.Offset(0, 8), ActiveCell.Offset(0, 27)))

why my QtyTests variable sometimes is saved as 0 even though there may be some cells that contain values?

Here is the expanded code:

Sub Macro()
'Global Variables
Dim QtyTests As Integer, ReqTests As Integer, InitQty As Integer, Cork As String, Corktype As String
Dim result As Long, x As Integer

[Code]....

View 2 Replies View Related

Addin Worksheet Function In VBA

Mar 20, 2008

I have found an addin (http://www.quantdec.com/Excel/smoothing.htm) that adds a worksheet function smoothing data. It operates with 2 arguments:
- a range for the input data to smooth
- a parameter detailing how to do the smoothing.

It outputs a matrix of smoothed results, and therefore requires the Ctrl-Shift-Enter on a spreadsheet. Until there no problem, the function works properly. However I need to repeat the process about 100 times. Therefore I extended my ranges to duplicate the calculations, and that also worked fine. But because I don't need the intermediate data (100 columns by 1000+ rows) and I don't like to wait 2 minutes for the calculations to finish each time I open the saved file again, I thought I could just use VBA and only output the final results.

This is how the working syntax is in a cell:
=SMOOTH(B3:B1032, "5RSSH,5RSSH,>,5RSSH")

And there the nightmare starts :
- I cannot apply it even once: I get a type mismatch whatever I do to calculate the range and put it as an argument of the function. I used a string to store the range name and use it as is (B3:B1032 or even "B3:B1032") or with the Range function Range("B3:B1032"). I even tried to put manually "B3:B1032" with the same result. First major issue

- Because the worksheet function requires a range, I cannot use an array, or at least I tried without success. Therefore I need to output the result on the worksheet each time it is processed, and reread it through the formula, for n times the loop is running for... Kind of inconvenient... So I tried to modify the original smooth() function to create a new one that would accept an array as argument instead of range, but with the same consequence: Type mismatch when I feed the new function with an array (which I checked contains the data to process).

I have tried an example I found somewhere using a built-in Excel Worksheet function MMult and it worked with ranges:

Sub SomeSub()

Dim xArray As Variant, yArray As Variant, zArray As Variant
Dim Fn As Object
Set Fn = Application.WorksheetFunction

xArray = Range("A1:B2").Value
yArray = Range("D1:E2").Value
zArray = Fn.MMult(xArray, yArray)

ActiveCell.Resize(2, 2).Value = zArray

End Sub

View 9 Replies View Related

Worksheet Function Match

Mar 21, 2008

I have a variable called LU which I am trying to use to do a match function in a macro.

OwnerOldRow = Application.WorksheetFunction.Match("C" & LU, "Owners1!$A2:$A65")

What I am hoping to do is find the row associated with column C and row value from LU. I have a stop on the line and LU is properly valued but it won't do the match. Is my syntax wrong. I am leaving the match type blank as it defaults to 1 which is the value I want anyway.

View 9 Replies View Related

Use Of Worksheet Function In VBA Code

Jul 15, 2006

I am trying to use a dynamic range in VBA. But I am getting compile error.

Range("D19:G19").Select
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("D19").Offset(0, 0, _
Application.WorksheetFunction. CountA( activesheet.name!Master)) , 3)

In the above code Master is a dyanmic range. I need to autofill the copied data in the 3 coloumns.

View 3 Replies View Related

TREND Worksheet Function In VBA

Sep 6, 2006

I am trying to use VBA to find a value on a trendline. I have been unable to call the TREND function from Excel, and I can't see what I'm doing wrong. I'm using the following line of
point25 = WorksheetFunction.TREND( Range("d2:d25"), Range("c2:c25"), 25)

I keep getting "Runtime error 1004 - Unable to get the Trend property of the WorksheetFunction class".

View 9 Replies View Related

Add Ranges In VBA To Worksheet Function

Sep 7, 2006

VBA will not allow the worksheet function MMult to be called during the subroutine. The error that flashes is: "Run-time error 1004. Unable to get the MMult property of the WorksheetFunction property"

Worksheets("MatrixOutput"). Range("ak4:di35").Select
Worksheets("MatrixOutput").Range("c4:ah80").Select
XTranspX = Application.WorksheetFunction.MMult("c4:ah80", "ak4:di35")
Worksheets("MatrixOutput").Range("b84:ag115").FormulaArray = XTranspX

View 4 Replies View Related

Worksheet Function Error

Jan 30, 2007

I am having problems getting the code right for the WorksheetFunction. I have put a snip of the procedure below.

I have data that is sequentially entered into columns, always in rows 4 to 18 with the column ref increasing by 1 each time new data is entered.

After each instance of data entry into a new column I need to loop through that data and, if the a cell value matches a value in range A1:A200, to place x in column B in the same row as the match in column A. All in Sheet2.

Set cStartcell = Sheet2.Range("IV4").End(xlToLeft) ' goes to last entered column
For Each cell In Sheet2.Range("B2:B200")
Application.WorksheetFunction.If(Match(Offset.(0, -1), Sheet2.Range.("cStartCell:cStartCell.Offset(15, 0)"),""x"")
Next

I have put the problem in bold. whatever I try seems to come up as 'end of statement expected' or 'identifier or bracketed expression expected' errors. When I have managed to get rid of errors the fromula does nothing.

View 3 Replies View Related

Create New Worksheet With Function

Jun 20, 2008

Can you have a function create a new worksheet? i know this is possible with a Sub but i haven't been able to do this with a function. Example is below. I'm planning to call the function from an Excel cell (i.e. =CreateNewSheet())

Function CreateNewSheet()
Sheets.Add
End Function

View 8 Replies View Related

Sum Function Wont Work In My Worksheet

Jun 4, 2009

The sum function won't work in my worksheet. See the green shaded area in the attached spreadsheet. Does anybody know what the problem is?

View 2 Replies View Related

Form Function To Save Worksheet

May 28, 2009

Is there something I can program into my form so that when a record is added and the 'add' button is clicked, it not only adds the record to the work sheet but saves the workbook as well.

View 2 Replies View Related

Update A Function When Opening Worksheet

Jul 20, 2009

how to update a function when opening worksheet. I made

View 4 Replies View Related

Function To Call Another Worksheet Query

Jan 9, 2006

I have a spreadsheet with 5 worksheets representing the working days of the week. Each worksheet contains data pertaining to every occurance of that day for as long as it has been recorded. Each day is broken up into hourly data.

So for example, for Monday's worksheet, you would have

Col A..............Col B........Col C
9/jan/06........5am.........data
9/jan/06........6am.........data
9/jan/06........7am.........data
...etc....then...
2/jan/06........5am.........data
2/jan/06........6am.........data
2/jan/06........7am.........data
...etc....

We are trying to create a function, on another worksheet called Query. The only way I can describe what we want it to do is to do it in psuedocode.

Psuedo........................................

View 10 Replies View Related

Benifit Of The Worksheet Function AREAS?

Jul 30, 2006

What is the benifit of the worksheet function AREAS?

How can we use it with other functions?

View 14 Replies View Related

HYPERLINK Function To A Second Worksheet In One Workbook

Dec 11, 2008

I'm having a problem with the HYPERLINK function. I am trying to make jumps from an index sheet to the large worksheet with all the actual info in it. The name of the file is SKU and the large info sheet is also called SKU. First I took the SKU sheet and numbered the rows (="A"&CELL("row",A1)), then in the index worksheet I created a VLOOKUP that finds the corresponding chapter title and returns that value.

Worksheet 1

A B C
1
2 100 =VLOOKUP(A2,SKU!$A$1:$B$3,2,FALSE) ="[SKU]SKU!"&VLOOKUP(A2,SKU!$A$1:$B$3,2,FALSE)
3 150 =VLOOKUP(A3,SKU!$A$1:$B$3,2,FALSE) ="[SKU]SKU!"&VLOOKUP(A3,SKU!$A$1:$B$3,2,FALSE)

I used the HYPERLINK formula in column D: "=HYPERLINK(C2,A2)" and it returns something that looks like the right thing but the link won't open.

View 2 Replies View Related







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