Sum Depending On Indent Level
Sep 22, 2009I was wondering if it was possible to do a SUMIF function depending on the indent level, e.g. sum all of the values which have an indent of 2 in the row headings.
View 2 RepliesI was wondering if it was possible to do a SUMIF function depending on the indent level, e.g. sum all of the values which have an indent of 2 in the row headings.
View 2 RepliesI need to determine if any of the cells selected by the user have an indent level equal to 1 and if so then have them confirm the action. the below works well if the user only selects one cell but if the select 2 or more and any of the selected cells has an indent level greater than 1 it doesn't show the confirmation.
View 3 Replies View RelatedI have a work sheet that is used for pricing purposes as follows
Column "A" contains a number between 0 to 4, where
0 defines a clear row
1 Defines Product Category
2 Sub Category
3 Actual product
Column "B" contains line item e.g
A 1 would produces 1
A 2 would produce 1.1
A 3 will produce 1.1.1
A 4 will produce 1.1.1.1
and so on
Column "E" contains the description of the product.
What i wish to do is if column "B" contains a "2" indent text in Column "E" by 1px, and if column "B" contains a "3" indent text in Column "E" by 2px and so on. If this could be added into a conditional formatting formula that would be good.
From what i have searched i cant find a means of doing this or a suitable function to assist in the formula.
I'm looking for an UDF Indent Function. There is one in the link below, but this is not true Indent. It is spaces before the text.
[URL] ......
I am trying to do some automatic formatting of a list of data to create an indented BOM structure in a similar way to DDiddy's post "Indent Data Based On Adjacent Symbol" (Indent Data Based On Adjacent Symbol.)
But want to set the IndentLevel for Column B by values in Column A. I.e. a value of 1 in Cell A1 indents Cell B1 by 1.
Username shg posted some code that he suggests should do this, but I failed to get it to work. Can anyone explain shg's code or suggest an alternative that would work, preferably automatically upon entering a value in Column A?
I'm only just starting to learn Excel macro's, so please forgive me if this post is in any way unclear.
I have a Spreadsheet with various tabs.I want to :-
1.A Userform to add records into "Material Indent"tab.
2.Secondly,transfer rows button on Userform to shift particular rows on entering Reel no. and date to "material Usage"job desired.xlsmtab.
I am trying to do some automatic formating of a list of data. I can accomplish 90% of what I would like to do via a simple keystroke record macro. What I cannot do is shift the contents of Column B based on the contents of Column A. Column B will have to be shifted to the right 1, 2, 3 . . . cells. Below is an example. Column A symbols as it relates to number of cells to shift Column B
Symbol......Amount of shift
-[-]..........0
--( ).........1
--[-].........1
---( )........2
---[-]........2
----( ).......3
I have included a sample .xls showing the Original Data and the Desired Output
I need advice regarding the best way to subtotal data that has been exported from SQL Reporting Services to Excel. Formulas are not exported with the worksheet and need to be re-entered. The data is contained in three levels, but second level is not always present (see attached). The Level 1 data has a "pale blue" background and desciptions start in column A. Level 2 data has a "Gray-25%" background and starts in Column B. Detail level data has no fill color and descriptions for it start in Column C. The detailed data should be subtotaled in the Level 2 line directly above it (if available). The Level 2 data should be subtotaled in the Level 1 row directly above it. If no Level 2 row exists beneath a Level 1 row then all of the detail rows below should be subtotaled in the Level 1 row.
I have looked at options for keying on the color or the column contents for triggering when to calculate the subtotals, but nothing that I have tried works. The attached sample file illustrates how the data looks after being exported from Excel. The number of detail rows may change at any time as new projects are added.
I'm working with text cells I get this tiny indent on the left hand side of a cell about the size of one hit of the spacebar button.
Excel doesn't recognise this as an indent and I can't get rid of it. It's, pardon my french
I had an idea that I could use the level of indent in the first column to provide the name for the range. The easiest way to explain is with the example spreadsheet I have attached
Cells C5:C10 show how the naming convention should look like, basically Indent Level 0 returns a prefix (Sheet_Name_Prefix) and its corresponding row entry in Column A. Level 1 should return the last Level 0 name and its corresponding row entry in Column A.
I had a go at the code and it works for Level 0 but I can't get it to put to Level 1.
Sub Test()
'Dimension Variables
Dim RowTitleEntries As Integer
Dim NameLoop As Integer
Dim IndentLevel As Integer
'Set the value of RowTitleEntries
RowTitleEntries = 6
In a macro I want to automatically insert a formula in several cells. The formula depends on other cells, and I want to be able to manipulate these cells with variables. Here is my code:
[Code] .....
All my variables are declared:
Sheets("DATOS YTD 2014").Cells(I, Semana + 1) is the cell I want to be able to chose due to the variables
Sheets("DATOS YTD 2014").Cells(I, 3) is the reference cell for the VLOOKUP formula, that will vary with I
SheetMonth.Range("B3:W172") is a range in the sheet SheetMonth which is fixed
The error message I receive is the following: "Run-time error 13, Type mismatch"
I precise that the next step is to make the ",6," part in the vlookup formula also variable... but I guess once my current issue is solved this one will be a piece of cake.
I want to catch the click event on "Increase Indent" commandbar button.
I have this reference- http://msdn.microsoft.com/en-us/libr...ffice.10).aspx
But not able to execute properly:
Till now I have generated below
Class Module "clsCBEvents"
Public WithEvents colCBars As Office.CommandBars
Public WithEvents cmdDecreseEndent As Office.CommandBarButton
Private Sub cmdDecreseEndent_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
MsgBox "Hi"
End Sub.............
I have a 2-column employee file. Column A has the employee id and column B has the manager's employee ID. The reporting layers can get pretty deep. In this example, there are 6 layers of reporting. For example, Employee id 1200 (which is not in column A) has 2 employees. One of them (1712) has several employees, one of whom (1680) has employees reporting to them and so on for several levels.
Is there a way in Excel (2003 or 2007) to summarize the reporting structure? For instance, I need to know all of the employees that report up through emp id 1712 - not just that report directly to 1712, but all those under 1712's tree.
I have the following function. the problem with this excel is i give it "C:" as directory, it search only one level of sub folders i.e it will search the filename in
C: est
C: est3
It does not go deeper. i.e it wont look in folder that is for example
C: estanotherlevel
C: est3anotherlevelmylevel3
How to modify my function so that it goes to the deepest folder. is there a way to do it?
Function GetFile(directory As String, filename As String)
Dim FSO As Object
Dim fldr As Object
Dim subfldr As Object
Dim file As Object
Dim fullname As String
[code].....
How can I obtain the sheet-level name through VBA? I'm not referring to the sheet (tab) name but the name as defined though Insert/Define or Insert/Create, etc .
I know the way to get the cell level name goes something like this:
MsgBox Sheet1.Range("A1").Name.Name
But i don't know the correct syntax for sheet level.
I have this memory game I want to set out on the computer. In table A, Row 2 (B2:E2) I (Moti) start off being the first player, where I place a series of different items. (In Example is given letters but can be kitchen article food and so…. Separated by coma) these Items are shown to player Jack, for a few seconds, so he can memorize them and Answer in (B3:E3) ....
View 9 Replies View RelatedI created 2 groups of lines (or outlines) with sub-outlines (so I have 2 levels) in the same worksheet.
I would like, via a macro, to display the 1st at level 1 and the 2nd at level 2.
Of course, I tried the "showlevels" command but it puts both groups at the indicated level.
Is there any command to work only on 1 of the 2 groups ?
With reference to thr great charts that Andy Pope has made available on his website; specifically the thermometer chart and the dollar spit chart. Is there any way that one can use these methods on something shaped like a bucket or do the shapes have to be "straight line shapes"?
What I was trying to do was to adapt the thermometer method to work on a bucket but I realised that the chart is built on a column chart. Thus a bucket would not work cos the top is wider than the bottom.
I'm looking for a formula to pull the correct piece of data from one worksheet and display it in another. I have tried VLOOKUP, but it is only returning values from the first instance of my lookup value. Below I have included a sample of what the data from the first sheet looks like. My lookup value is entered on Sheet2 in cell A1. The formula I have used is as follows...
=VLOOKUP(A1,Sheet1!A2:D13,4,FALSE)
The result this would return for a value of 111111111 is 15, but I'm looking for one more level of depth in this lookup, by being able to pull not necessarily the cost of the first code, but of a specific code......
Is there any way to reference a directory that is up one level from the ActiveWorkbook.Path?
I am trying to accomplish three goals:
1. Maintain a Master Database in a root directory and pull data from a subdirectory - EASY:
VB : FilePath = ActiveWorkbook.Path & "sub-DirectoryName"
2. Maintain a Minor Database located in a sub-Directory, Named by Month, and pull data from the Master Database located in the Root Directory (up one level). Which I cannot find the right syntax for - ".." does not work.
3. Maintain a Minor Database in a sub-Directory, Named by Month, and pull data from a different Minor Database in a Different sub-Directory (e.g. up one level to root directory, then down one level to "January"). Which I also cannot find the right syntax for.
The Databases are going to be moved around A LOT, so I have to use relative paths.
I have a workbook with three sheets.
Sheet 1 is a large data array (approx 8 columns x max 400 rows), than contains the inventory and cost information of a list of products in a running cafe.
Sheet 2 is is a recipe analysis tool that I want to be able to use data validations to cost out recipes, drawing information from sheet 1 in three dependent drop down boxes 1- category, 2- supplier, 3- item name, which then returns that items cost per standard of measure.
Sheet 3 is where I have started to try to generate a unique list for category and supplier to assist sheet 2 in referencing from sheet 1.
There is data overlap across the inventory items, with many items having the same category and or supplier.
Examples that I have found online use the index and match function, in conjunction with naming to return the array required for the drop down, however most of these examples I have found contain simple unique lists.
I cant seem to nut dynamic naming, which is integral as the list is expanding and contracting all the time.
So far I have been successful by manually naming a range (not a satisfactory solution as per above) and then using the indirect function to reference that named array from sheet 1.
Been trying to figure out whats wrong with my formula. The 4th column doesn't seem to produce the intended result. I have attached here for reference.
View 4 Replies View RelatedI am making a chart for displaying the amount in inches that we have in the water tanks.
The idea is to have a setup like this...
create a multi level BOM in excel:
i have a formula
A=a+b+c+B
B=a+d+e
if i select A, i need excel to give 2a+b+c+d+e (and that should be in another sheet.
also i may take 50% of A +50% of B the resulting formula must appear.
i attached an exemple file.
I have a sheet on the left is a list of document names, next to the list is a hyperlink to the actual document. On the right is a drop down list.
The list contains:
Started
In Progress
Complete
I want each person to be able to use the dropdown list to move to the next level but not be able to go backwards.
Example of how it would work:
A person would click the link to the document and set the status to Started in the drop down.They would read half the document and set the list to In progress. However they would not be able to go back to Started or a blank cell once they have set it to In Progress. The same applies to the next level, if they set it to Complete, they cannot change it to anything. Perhaps before "locking" it as Complete there could be a message box warning that the action is not reversible and giving the option to leave it as In Progress.
I know the disabling of 'Save As' has been covered alot. I have successfully disabled both Save and Save As at the file level by the following:
Making file Read Only (which disables Save option)
Inserting the following VBA to make the Save As disabled.
[Code].....
The remaining problem I have is disabling the Save As prompting at the program exit level.
For example, if I have a read only file with Save As disabled and I choose the workbook (file) level close window (X) button, I am prompted to save the file but am not allowed to. This is the behavior I am looking for.
HOWEVER, if I choose to exit the file by selecting the program (Excel) level close (X) button, I am prompted to save a copy of the file and it allows me to do it.
I do not want my ~180 users to have any option to save the file once it is uploaded to a centralized server location. It is a large file and I do not need multiple versions floating around.
Is it also possible to disable the 'Save As' on close at the Program level??
when you sort by VBA, you can only do 3 level of sorting. is there a workaround solution for 4 or more level to sort?
I am using excel 2007 but the data excel is xls.
Is it possible to subtotal a spreadsheet that already has a level of subtotals on it?
View 2 Replies View RelatedI have to write a calculation that sums a range of values. Times that sum by a given amount but only if the total of the original sum is greater than a specific criteria -
A
B
C
D
E
F
G
H
I
J
K
L
M
PRODUCT
[Code] ........
In the above example it calculates the total units sold of Product A, by Month, by 5.00.
In Column M, It totals the number of sales units and then also totals the number sales units by that given value 5.00. So 426.5 x 5 = 2132.50
I need a sum that only totals the value over a given criteria.
EG. Total 426.5
Criteria > 300 = 126.5
Sum would equal 126.5 * 5
I'm building a sales report that has various formulas to work out rebate percentages based on the number of units.
I've written the if statements for these but how to get formula to work out the number of units required to achieve the next highest rebate level.
rebate levels
>=150 units= 1% rebate
>=300 units =2% rebate
>=600 units =3% rebate
column I has the unit totals and in column M I need to have a formula to work out how many units the customer would need to purchase to achieve the next rebate level. Headers are row 1 and data begins in row 2.