Custom Range
Feb 9, 2007
to complete the attached worksheet. My aim is to “bring” into the RANGE column the contents of corresponding cells in that column whose name is chosen in the Select dropdown. I suspect that one of these lookup and reference functions can do this task but am lost as to which one of them:
CHOOSE
COLUMN
COLUMNS
HLOOKUP
INDEX
LOOKUP
MATCH
ROW
ROWS
VLOOKUP
View 4 Replies
ADVERTISEMENT
Feb 18, 2014
I have a custom range I'll be copying from one sheet (a single entry registration form) that I'm adding to another (an "all entries" sheet) with a button assigned to a macro.
[Code].....
I then loop through the range, copying the cell from Sheet1 to Sheet2.
[Code]....
All works perfect, but I need to manipulate the data a little. If B3 from Sheet1 equals a certain string, I want to manipulate the data From Sheet1 B6 & B7 to paste into Sheet2 Column 1, otherwise paste B3 into Sheet2 Column1.
Again, my loop and everything works if I put B3 into Column1, B6 into Column2, and B7 into Column3, but it doesn't play well with the reporting I want to do later from this sheet.
Data Example
[Code]....
What I'm trying to do is
if B3 <> "NEW TEAM" then put B3 (Joe Smith on Sparkles) into the new sheet column1
if B3 = "NEW TEAM" then put "B6 on B7" (Jane Doe on Fluffy) into the new sheet in column1 (where B6 and B7 are the strings, obviously).
I haven't figured out how, in my loop, to access the data in (myCell + 1) and (myCell + 2) while I'm on the first cell (myCell). I could do it by jumping back to the Sheet1("B6") and Sheet1("B7") but I'm trying to write reusable code, and this range might change, so I'm trying to be a little more flexible than hard coding in more cells.
View 1 Replies
View Related
May 18, 2009
I recently set up some functions based on Chip Pearson's tutorial for referencing worksheets from Formulas. (http://www.cpearson.com/excel/sheetref.htm)
The problem I'm now having is that I can't use VBA to set these functions in place; it returns a syntax error.
For example, I want I37 on most sheets to have the same formula. So I have the following:
View 3 Replies
View Related
Jun 20, 2006
I am trying to write a UDF that will calculate a value and return it to the cell, and also create a comment in the cell showing the formula used. Here is an example of the "=calculate(A2,B2)" placed in cell A1
Function calculate(ByRef X As Range,ByRef Y As Range)
calculate=x*y
calculate.addcomment "calculate = " & X & " * " & Y
End Function
the problem commes from the add comment field. I can add a comment to any cell but the cell the formula is called from.
View 3 Replies
View Related
Dec 10, 2008
I took an Excel course in college but am a bit rusty. I have a customer database that I created and I would like to see certain things after entering a date range that I specify. I uploaded a small excel sheet to show my database and what I'm looking to do. Basically I would like to enter a date range and see these answers:
Total Orders in that date range
Total unique orders in that date range
List of customers (name included) who ordered more than once in that date range
The only columns of data I need to use are: firstname, lastname and orderdate.
View 4 Replies
View Related
Oct 17, 2009
The code below works fine, I can copy selected area into new sheet. However, I wish to custom change the Range("A1:AO164") value, for example, at cells(1,1) I key in A1, then cells(1.2) I key in A56, then this changes will reflect to the value in this macro to Range("A1:A56"). I tried using this way :
Dim A as string
cells(1,1).text = a
cells(1,2).text = b
Range("a:b").Select
View 2 Replies
View Related
Jul 30, 2012
I have a custom range -55% to 55% as part of a grading system for sales growth. I want to return a 0-100% grade depending on where within that -55% to 55% range a sales reps growth for a month falls. For exaple, if a sales rep scores 0% growth for a month, they will receive a 50% grade by where 0% falls within the -55% to 55% range.
View 1 Replies
View Related
May 7, 2013
I need to create a custom function that can do the following without modifying the selected range. If I have data in a row, I need a function that can give me the following result:
Original unsorted data:
79
45
23
56
1
The custom formula will not modify the selected range, and after saving it or copying somewhere and sorting it, it will provide the following result: if N or count(range)=5 , and p=1, average(second and third smallest values of the range)=34; and if N=4 (lets say that we errase the number 1 data point in the range), average(third and fourth smallest values of the range)=67.5 So it is basically a sort and then getting the averages of specified row numbers depending on N or count(range) Here is what I have.
I'm missing how to create a variable with the sorted range and how to use an index to refer to the rows I want to average:
Function CSORT(r, p)
Application.Volatile
'rs or something similar that will contain the sorted range r
Dim rs As Range
'Sort rs (The following line one doesn't work, so I need one that does)
rs = Application.Range(r).Sort
Dim p As Integer
[code]....
View 1 Replies
View Related
Nov 19, 2013
I have come across this wonderful piece of code that kind of accomplishes what I am after, to a point. Though I would like the output string to be displayed with a few extra characters.
Code:
Function Concat(rng As Range, Optional sep As String = " , ") As String
Dim rngCell As Range
Dim strResult As String
For Each rngCell In rng
If rngCell.Value "" Then
strResult = strResult & sep & rngCell.Value
End If
[code].....
I want the output to be:
["cell1" , "cell2" , "cell3" , "cell4" , "cell5"]
View 2 Replies
View Related
Jul 25, 2006
code to pass a range say (A1:A3) as an arguement among other arguements to a custom function and then reading this as an array inside the custom funtion
View 4 Replies
View Related
Feb 15, 2014
I'm trying to make a converter between about 8 various types of values. These are not units like Km or miles or something like that, but rather numbers that represent a specific "hardness value" on a variety of scales (to name a few: HRC, HRA, K)
What I've been doing so far is plotting the two types against eachother and then getting the best trendline I can so that I can use that formula to convert between the two with relative certainty. (for example, when plotting HV vs HRC my fourth order polynomial trendline with an Rsquared of 1 is y=0.0001x4 - 0.0188x3 + 1.0768x2 - 20.709x + 350.69)
My questions comes up where I was hoping to make a window or box of some sort allowing the user to input a numeric value, then selecting the Input units and the hopeful output calculated units, and have the box spit back to the user the conversion.
View 9 Replies
View Related
Jul 3, 2009
I am performing a lookup using the populare user defined function nlookup, which does not take a lookuparray argument to find lookup values. But I only want to return lookup values that fall into a certain array. To accomplish this, I figured out that I need a way to specify a condition of the type "if cell address of lookup value falls within range"
It should be possible if I find a way to return the cell address of the nlookup value, but as nlookup is not limited by a lookuparray argument, so I was not able to use the address/index/match that come up in similar questions.
View 3 Replies
View Related
Sep 2, 2008
I want to be able to create a range of VBA userforms to quickly perform long tedious tasks. I want these userforms to be accessed from a nice tidy toolbar.
I have done this and it looks nice and works well. What I would like to be able to do is have my custom toolbar of userform controlled functions be transferable so that if someone else wants my toolbar and attached functions they can install it easily much the same way you can do with an add in.
Is this sort of thing possible or does it require them to manually install all my userforms, modules and toolbar? If it is possible what sort of things should I be looking at?
View 9 Replies
View Related
Nov 6, 2007
I added a custom add in ages and ages ago and have forgotten how I did it! I'm now trying to remove it but not having much luck.
Its not listed in the Tools>References menu and its not added on to a workbook saved in the C:Documents and SettingsUserApplication DataMicrosoftExcelXLSTART folder.
Are there other ways I could have added it? If so can someone let me know as I might be able to remove it then!
View 9 Replies
View Related
Dec 23, 2008
If I send a workbook out with the zoom set at 90...will the zoom be at 90 when others open it.? Also, is there a worksheet event that I could insert to force a specific worksheet to always open with the zoom at 90??
View 2 Replies
View Related
Mar 2, 2009
I have a 9 digit number that I want to format as 999.9999.99 Can anyone tall me how? Does anyone know a good link with pointers on custom formats?
View 9 Replies
View Related
Mar 18, 2013
When using format cells > number >custom I want to custom oC with the degree symbol in superscript. how to get superscript into the custom box? Also where is the superscript icon for the quick access toolbar in Excel?
View 3 Replies
View Related
May 20, 2014
I am trying to sort a sheet based on the values in a column.
S, SI, M, MI. and it need to be sorted only in this order.
View 2 Replies
View Related
Aug 11, 2009
I am working on a excel file to help me interpret survey data. I am having some problems transposing data from tab1 to tab2. So basically, I need all the data from Z on tab1 to be transposed on individual lines on tab2, attached.
View 5 Replies
View Related
Aug 17, 2009
i had a play with a document that contains a custon menu bar and now the menu bar is always there.
the code that puts up the menu bar is ...
View 6 Replies
View Related
Oct 17, 2008
I am trying to add aright click menu item a cell.
I am using the following code in a module.
Sub addmenu()
Set nbar = Application.CommandBars("Cell")
Set ntrnew = nbar.Controls.Add(Type:=msoControlButton)
ntrnew.Caption = "Paste In"
ntrnew.Visible = True
ntrnew.BeginGroup = True
ntrnew.FaceId = 110
ntrnew.OnAction = "Test"
To trigger the first code when needed.
I know this all works when I put it in brand new workbook it works my custom menu appears and I can run the the "Test sub"
However as soon as I put this in the workbook where I want this to work it does not show the menu.
It is there though as when I step through the remove Sub I can see it matched and then deleted.
I thought at first it was protection but that is now removed but still no joy.
I can not see any setting that controls these sub menus.
View 9 Replies
View Related
Dec 3, 2008
I am writing some custom functions to be saved in an Add-In file, but am having trouble saving named ranges. I would like named ranges in the Add-In file to be available in other spreadsheets. Is there a way to do this? Or is there a way to take a range from Excel and save it into a globally available named range using VBA?
View 9 Replies
View Related
Aug 18, 2006
I would like to custom sort a table by ID, the first ID to be shown on top would be the ID the user enters in an inputbox. Below is the code I used but I don’t know why its not working:
Sub CustSort()
Dim MyCount As Integer
MyCount = Application.CustomListCount + 1
MyValue = InputBox("Enter ID")
Application.AddCustomList Array(MyValue)
ActiveSheet.UsedRange.Sort _
Key1:= Range("A1"), _
Order1:=xlAscending, _
Header:=xlYes, _
OrderCustom:=MyCount, _
MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.DeleteCustomList MyCount
End Sub
find attached an example, try entering 300000 in the inputbox the custom sort doesn’t work
View 6 Replies
View Related
Jun 29, 2008
With page breaks in Excel, is it possible to have different pages span a different number of columns?
Right now, I have my page breaks laid out so I've got 3 separate pages. Currently, they are each 30 rows in height, and 30 columns in width.
However, I want the first one to be 20 columns wide, the second to be 30 columns wide and the third to be 40 columns wide.
If I try and drag the vertical blue bar, I adjust the column span for all 3 pages. I need a way to drag the vertical blue bar for each page separately.
View 3 Replies
View Related
Aug 11, 2004
I am wanting to create a custom function that i can enter into a cell to run a macro (MyMacro). I do not know how to write a function, but so far i have:
Public Function Run(MacroName As String)
Application.Run MyMacro
End Function
View 6 Replies
View Related
Aug 6, 2014
I've got a few worksheets that have staff names on Col A. And these names are under sub headings of what position they work in (Foremen, Operatives etc..).
Before I had access to them, the names were not in order, now I've change it to A-Z, for each staff under their position.
I know you can make your own custom order list, so the list goes top to bottom : Supervisor, Formen, Operative, Office.
What I sometimes need to do is sort Col B or C. But is am unable to sort it back to it's original state
Attached is an example of how I would like my spreadsheets to look. But is there a way to use Sort & Filter so it sorts the entire table by position, keeping the correct name under the correct position heading.
New Microsoft Excel Worksheet (2).xlsx‎
View 9 Replies
View Related
Mar 20, 2009
I need to create a custom number format for a recorded delivery number in an excel sheet. I want it to look like AA 1234 1234 1GB in the cell even if the user enters it without spaces e.g. AA123412341GB. I have had a bit of a play around with underscores to get spaces but nothing seems to make it change.
View 4 Replies
View Related
Apr 22, 2009
If I have the following info:
A1 = 5
A2 = -4
A3 = 0
How can I use Format Cells > Custom to have them display as:
A1 = 5 up
A2 = 4 dn
A3 = Level
I've been trying and trying but keep getting a message that I should use one of Excel's pre-defined formats.
View 3 Replies
View Related
May 25, 2009
What I have is a table with over 20 columns that I use to sort and AutoFilter the 200+ rows of data. Several of the columns use Data Validation which require data to be from lists.
So, my problem occurs when I add a new row of data... I don't want all the values in the row to be blank (Some values should never be blank... This is why Data Validation was used here). Is there any kind of New Entry feature or some easier way to enter a new row of data? I know some other Office applications that use an easy UI to 'fill in' data types when a new entry is added.
At the very least, since it might be the only plausible result, I'd like a new row of data to result to default values (i.e. the top value in the list) in the columns that have data validation since should not be accepting blank values.
Also, I am very good with formulas and finding my way around Excel's features, but I'm not very experienced with the VBA programming or custom macro-writing.
View 12 Replies
View Related
Aug 30, 2009
I'm working on a workshet where ppl fill in vehicle numbers, but they all find their own unique ways to fill them up. Some of the examples are below:
MH 04TN 2315
HR 38G 9605
9605G
H9425
TN04A8451
GJ04 GA5142
KA 0072
3,4,7 are incomplete nos. while 1,2,5,6 are all complete nos. I want the format of these above nos. to look like this:
2315TN/MH04
9605G/HR38
9605G
9425H
8451A/TN04
5142GA/GJ04
0072KA
Can this be done automatically in a worksheet using the custom cell format function??.... because then it wud get formatted as necessary whenever someone enters a vehicle no. in that particular column.
View 4 Replies
View Related