That's basically it.
I have a * in some cells to represent "All" data, because I need it for some formulas later, but I want to use it in the titles so it would be nice if it could display "Total" but still maintain the * below.
As you can see from the picture, the cell should be showing "Total" (red arrow) while mantaining the vale as "*" (blue cirlce).
Tried a few tutorials but nothing seems to work, I'm not sure if it's because it's an asterisk or what.
Edit: the tutorial I mostly followed is this one, in my case instead of 1,2,3,4,etc I have * (aka the value) and I want to display "Total" instead.
Custom number formats in Excel split into four categories:
Positive values
Negative values
Zero values
Text values
* is a text value so you want the fourth category and you get this by inserting semicolons before the required format to indicate that 1, 2 and 3 don't apply so you end up with:
;;;"Total"
where A2 and A4 actually contain an asterisk.
You have cells that have contents X but you want Excel to say, "no, no. I'm going to show you Y"?
Aside from sounding like a maintenance nightmare, I am not aware of a way to do that.
Related
I am fairly new to Excel and only using it for a hobby, however I have noticed that when I attempt to add an entire column of values together, there is one value that is not included in the addition. It is also the only 'non-defined' value of the column (i.e. it is calculated using a formula rather than being inputted directly). When I go to edit the formula I see that the value in question (in the below screenshot 24.99), it seems to be a string given the speech marks either side of it, hence why it isn't in the addition.
I am confused as when I reference only that value in a sum, the value is included in the sum, as seen below:
Before it is suggested, I have experimented with using different data types for the value in the cell, including 'Currency', which is what the rest of the cells in the column are, as well as 'Number', 'Accounting', and 'General'. One thing that is strange is that the £ symbol never appears at the front of the number, no matter what data type it's casted as.
For those that are curious, the formula that is used to get the number in the cell B9 is below, where H13 is a number in the form 'Currency', and J13 is a number in the form 'General'.
=IMPRODUCT(H13,J13)
Per this link, a common way to convert text formatted numbers to, well, 'numbers' is to apply a mathematical operation (e.g. if you have ="100", multiplying by 1 will yield 100 - see screenshot)...
Cell constituents
Result
See here for Microsoft's own words "Numbers that are stored as text can cause unexpected results.".
In your example (which I've successfully replicated to aide this soln. - see below), taking 0-B9 (per below screenshot, courtesy your Q above) yields -24.99 in this case as Excel interprets cell B9 as an operand, upon which -1x (as an operation) is applied:
Put another way, you can yield exactly the same (or rather, 'anticipated') result via the summation formula as follows:
Included in the above figure is a depiction of how I have become familiarised with this 'conversion via mathematical operation' trick: it shows how taking 0 + False = 0 (or rather, per the depiction above, 0 + True = 1).
Simple example
Try the following to convince yourself:
Enter ="0", ="1", and ="2" in cells A1:A3 respectively. In the adjacent column/cells (B1:B3), enter =1-A1/A2/A3 as the case may be, i.e.:
Results
Advanced example
Now go ahead and enter (per cell) 3 a's followed by 'b' and 'c' (lowercase) in cells A1:A5. In cell B1 enter the formula "=A1:a5 = "a" (assuming you have Office 365, else use 'Ctrl+shift+enter'). This will return an array of corresponding 'True' and 'False' values for any character (col A) that satisfies the condition '="a"', videlicit:
Of course, summing column B would be futile (well, it returns 0):
However, applying an innocuous mathematical operation '1 *' makes all the difference in the world: you now have an elegant (but time / calculation expensive) way to calculate the count of cells that satisfy the criteria '="a"' - in this case, 3!
Of course, the same could be achieved using any 'neutral' calculation - for instance, adapting the apparent anomaly you've stumbled upon, using sum(0+(A1:A5 = "a") yields the self-same count of 3 ☺
i.e.
Trust this delineates/clarifies (with sufficient detail) the reason why a straight summation (which lack any 'special' operations in its own right) does not include text values, where as taking 0-B9 (per your Q) does (i.e. via the implicit 0-1*B9 operand with respect to B9).
using different data types for the value in the cell, including 'Currency'
What you changed is the number format, not data type.
It's an important difference in Excel, you can change format of cells containing numbers, however if a cell contains text - regardless of it actually represents a number - changing number format will not affect it.
=IMPRODUCT(H13,J13)
This function is used to multiply complex numbers. You could use =H13*J13
when I reference only that value
Functions taking multiple values (SUM, AVERAGE, MIN...) are designed everything not stored as number.
On the other side, if you explicitly include text in a calculation, Excel will try to convert it (e.g. 1 + "9" = 10).
That's what happens in your example too, you don't just include your string in SUM, but first it's added to 0.
I am looking for some decent help with my matrix table, and is there a good or best approach to properly match dependent instances in certain matrix using drop downs.
This picture represents my matrix table (Picture 1):
As you can see there are a lot of instances, but horizontally and vertically they got the same number of "headers". Those "1`s" are representing not compatibility in my case but lets call it simply "match". That is on one sheet that is gonna be populated with some new values from time to time.
On another sheet which is actually sheet for showing the data and their compatibility possibilities is equipped with drop downs. There you got "Groups (Group1, Group2...)" in a sense of main parts and "dependent groups (AA1, BB2..)" as small components that are part of main parts. To avoid misunderstanding here you have explanations, I used for the sake of this example fictional values:
Groups aka. Main Parts
Dependent groups aka. components
As you can see beneath, is my fictional table but exactly the same concept as I should use in my real case.
I PUT AN EXPLANATION IN THE PICTURE 2 SO YOU CAN FOLLOW ALONG AND SEE EXACTLY WHERE/WHAT I DID!
What I used firstly there are =match functions, one for vertical position (A3) and one for horizontal (B4). This boolean row is done using =or(index) but reffering to the match positions as you can see. And from there I should use true/false for coloring my group boxes in a case compatibility is possible - thats all the science.
So, my question is if there is another approach to this problem? As you can see I have 3 different rows of functions at one place, or imagine if I will have more "groups" that can rise in many more rows and calculations.
Picture 2
EDITED:
This is screenshot of the original sheet, I just hid some rows that were with Infos that is reason the number is not consistent. As you can see it is almost the same as dummy example I provided above. Underneath every "box" you got three rows of calculations as I mentioned before. The two times number "2" that you see here is the position of some value that I found using =match function, one is for horizontal and another for vertical lookup. In this case it is model type, 070FX is position 2, 100FX is 3 and 200FX is 4th position in the matrix table, and so on for all the other groups. And those groups (Model, Endpoint, Gas sensor...) are defined separately on another sheet where I had to make unique list and dependent list so I can reference those to my drop down list.
EDIT Nr 4! So this formula I used for true/false:
=SUMPRODUCT(('0359-matrix'!$A$2:$A$101=F10)*(('0359-matrix'!$B$1:$CW$1=$B$10)+('0359-matrix'!$B$1:$CW$1=$C$10)+('0359-matrix'!$B$1:$CW$1=$D$10)+('0359-matrix'!$B$1:$CW$1=$E$10)+('0359-matrix'!$B$1:$CW$1=$F$10)+('0359-matrix'!$B$1:$CW$1=$G$10)+('0359-matrix'!$B$1:$CW$1=$H$10)+('0359-matrix'!$B$1:$CW$1=$I$10)+('0359-matrix'!$B$1:$CW$1=$J$10)+('0359-matrix'!$B$1:$CW$1=$K$10)+('0359-matrix'!$B$1:$CW$1=$L$10)+('0359-matrix'!$B$1:$CW$1=$M$10)+('0359-matrix'!$B$1:$CW$1=$N$10)+('0359-matrix'!$B$1:$CW$1=$O$10)+('0359-matrix'!$B$1:$CW$1=$P$10)+('0359-matrix'!$B$1:$CW$1=$Q$10)+('0359-matrix'!$B$1:$CW$1=F13)+('0359-matrix'!$B$1:$CW$1=G13)+('0359-matrix'!$B$1:$CW$1=H13)+('0359-matrix'!$B$1:$CW$1=I13)+('0359-matrix'!$B$1:$CW$1=J13))*'0359-matrix'!$B$2:$CW$101)>0
I copied only last part, or when it starts from second row..Because it is too long to write whole funciton - it cuts down automatically.
('0359-matrix'!$B$1:$CW$1=$Q$10)+('0359-matrix'!$B$1:$CW$1=$B$13)+('0359-matrix'!$B$1:$CW$1=$C$13)+('0359-matrix'!$B$1:$CW$1=$D$13)+('0359-matrix'!$B$1:$CW$1=$E$13)+('0359-matrix'!$B$1:$CW$1=$F$13))*'0359-matrix'!$B$2:$CW$101)>0
But on marked cells I am getting the same results: B22 - F22 has the same as B21 - F21 (boolean) what shouldnt be like that but to follow color, green is False, it has to be something with an array reference.
Checkout the following. A1 to E5 is the matrix that shows which pieces are incompatible (=1). The others have to be empty or 0.
In cell I8 I used the following formula (and copied it down up to I11):
=SUMPRODUCT(($A$2:$A$5=H8)*(($B$1:$E$1=$H$8)+($B$1:$E$1=$H$9)+($B$1:$E$1=$H$10)+($B$1:$E$1=$H$11))*$B$2:$E$5)
The formula result shows you the amount of incompatibilities a part has. Eg AA1 has one incompatibility with BB2 but BB2 is incompatible with 2 AA1 and CC3.
To get the TRUE/FALSE use the same formula and append >0: like =SUMPRODUCT(…)>0
For any additinonal "group" (Model, Endpoint, …) you need to add another +($B$1:$E$1=$H$12) where $B$1:$E$1 points to your matrix data and $H$12 to your selected group value.
Overview of the formula ranges:
Note that this kind of calculation can only tell the amount of incompatibilites a part has but not the names of the parts that are incompatible.
Edited horizontal version
Formula in the selected cell is
=SUMPRODUCT(($A$2:$A$5=G8)*(($B$1:$E$1=$G$8)+($B$1:$E$1=$H$8)+($B$1:$E$1=$I$8)+($B$1:$E$1=$J$8))*$B$2:$E$5)
you can pull it to the right.
I would like to ask for your help with the formulation of a formula in Excel in order to compare the total number of search results upon using different sets of separator characters.
As I have multiple columns with content, as in the example below, I thought it would be possible to Count the search results in some way and do this for each column separately ( I would actually prefer to treat each column separately).
A
1 L-516-S-221-S-223
2 H-140.STR3
3 ST0 XP 23-9
4 etc.......
Preferably, I would like to use a varying a set of separator characters in order to determine the impact on the number of search results based on this set of separator characters. Logically, with an increasing number of separators more results will be returned (depending on separators included in the cell values of course).
The set of characters that I would like to experiment with is: “-_ .,;: “
Hopefully this makes sense and someone is able to help me out. Thank you.
Kind regards,
P
In your example - on its own will detect all three instances but for an overview you might construct a grid (say B1:H1 of your separators, including a space rather than an empty cell) and ColumnA each column in turn (maybe via links) then a formula in B2 such as:
=--ISNUMBER(FIND(B$1,$A2))
copied across to ColumnH and down to suit.
Alternative formula (for different question):
=IF(LEN($A2)-LEN(SUBSTITUTE($A2,B$1,""))>0,LEN($A2)-LEN(SUBSTITUTE($A2,B$1,""))+1,0)
Assumes, for example, no trailing spaces and separators are always separated. Results are not necessarily cumulative.
In my job I have to enter warranty information so that POs can be cut. Vendors are very particular with how this is entered and each one has their own format.
One of them requires data be entered:
SN:
MACHTYPE:
Further, the information for this is sent in a single composite number, something like:
10Y754235FUYJ9
Requiring the final input of data to be:
SN:10Y75423
MACHTYPE:UYJ9
The first 4 digits of the composite are the MACHTYPE and the final 8 are the Serial Number.
The impasse I've reached is I can't seem to get auto-fill to replicate the skipping of lines as I've formatted. It will jump a number of lines equal to however many I've selected.
Any ideas about getting it to replicate the first four Formatted Data? I've been throwing myself at this for a couple hours now.
Thanks in advance!
I think you're over complicating it by using two rows for the Formatted Data. I'd wrap the text (Home tab > Alignment section) for the cells in column F and use the following formula to insert a new line:
=CONCATENATE("SN:",B1,CHAR(10),"MATCHTYPE:",C1)
Then just leave the formatting like you had it by row...
Okay, let's focus on the title. When A1 is 10Y754235FUYJ9,
="SN:"&LEFT(A1,8)&CHAR(10)&"MATCHTYPE:"&RIGHT(A1,4)
will give you the output:
SN:10Y75423
MATCHTYPE:UYJ9
And don't forget to set the wrap text checked at Format Cells menu.
I have color strings in one of my columns, like red, purple and so on. I want to replace those colors with corresponding numbers. Red becomes 1, purple becomes 2 and so on.
Thats not so hard, I used substitute, like this:
SUBSTITUTE(E3;"red";"1")
Now the problem ist that some columns have 2 or more colors, like "red purple", so I tried using:
SUBSTITUTE(E3;"red";"1")&SUBSTITUTE(E3;"purple";"2")
That results in a value in my column that looks like 1red, There is the color from that row attached for each &SUBSTITUTE I add. If I added another color, like that
SUBSTITUTE(E3;"red";"1")&SUBSTITUTE(E3;"purple";"2")&SUBSTITUTE(E3;"green";"3")
it would become 1redred.
How can I solve this issue? I want to replace each color string with its corresponding number.
Thanks!
Try this
=SUBSTITUTE(SUBSTITUTE(E3,"Purple","2"),"Red","1")
Please consider the following more compact solutions (assuming tested cell is A2):
Using MATCH: if you need to return sequenced numbers like 1, 2, 3 ... - this formula will do the job:
=IFERROR(MATCH(A2,{"Red","Green","Blue"},0),"UNKNOWN COLOR")
You may add a multiplier / constant to the returned value as well. Order in sequence of strings equals the number returned.
Using VLOOKUP: if you need some defined set of returned values - define them in 2-dim array constant:
=IFERROR(VLOOKUP(A2,{"Red",10;"Green",20;"Blue",30},2,0),"UNKNOWN COLOR")
For this example 10, 20 and 30 will be returned.
Both formulas include error handling for unspecified colors.
Sample file is shared: https://www.dropbox.com/s/77aj1vl6c5gek5c/ColorsLookup.xlsx
P.S. I'm not sure about correct array dimension delimiters, since my local settings use different ones, but in sample file formulas work fine.