Excel Formatting issues - excel

I am about 1500 data split into for different cells. I am trying to join them when I do that the zero value before the number isn't getting added.
Say for example:
| B | C | D | E |
1| 90 | B8 | 6C | 04 |
and all the cells are in number format.
I do the following: E1&D1&C1&B1 I get the results like 46CB890 instead of 046CB890. I can add a zero to the value but there are 1500 data and I don't how many have this issue. How to solve this? so that I get 0 while joining the values.
Thanks!

Change the format of all the cells to text (fill E1 with 04).
Re-use the formula and it should work.

Related

Excel formula to find a conditional minimum of visible cells only

At first I must to apologize if I did some translation mistakes of formula names. It will be hard to describe what I need because Polish Excel formula names are totally different than English ones and it is not possible to switch between languages and the names in Excel. But let's try...
I know solutions to find a conditional minimum using e.g. {=MIN(IF($A$2:$A$10=$A11;$B$2:$B$10;""))} array formula and to find a minimum of a filtered group of cells (minimum of visible cells only) using e.g. SUBTOTAL(105;$B$2:$B$10) or AGGREGATE(5;3;$B$2:$B$10) formulas but I can't find a way to merge both these solutions together to get the minimum of all visible cells meeting the condition.
In other words I need to get the minimum value of visible cells only in the range B2:B10, but only from rows where the value in the range A2:A10 is equal to a particular value in the cell A11 and the value in B2:B10 is greater then zero.
+---+-----+
| A | B |
+---+-----+
| 1 | 170 |
........... <== here some hidden (filtered or grouped) rows with other values
| 1 | 120 |
| 1 | 100 | <== minimum for "1"
| 1 | 0 | <== not included for "1" - only > 0
| 2 | 110 |
........... <== here some hidden (filtered or grouped) rows with other values
| 2 | 109 |
| 2 | 105 | <== minimum for "2"
| 3 | 50 | <== minimum for "3"
| 3 | 0 | <== not included for "3" - only > 0
+===+=====+
| 1 | 100 | <= expected results of formula - minimum values, greater then zero, for groups "1", "2" and "3"
| 2 | 105 |
| 3 | 50 |
+---+-----+
Kind regards - McVik
Use AGGREGATE(15,7,...), which allows array processing:
=AGGREGATE(15,7,$B$2:$B$10/(($A$2:$A$10=$F12)*($B$2:$B$10>0)*(SUBTOTAL(3,OFFSET($B$2,ROW($B$2:$B$10)-MIN(ROW($B$2:$B$10)),,1)))),1)
I helped myself temporary by adding a "technical" column (e.g. "C") with a simple formula in each cell
=SUBTOTAL(103,$B2)
=SUBTOTAL(103,$B3)
=SUBTOTAL(103,$B4)
... etc.
and the final array formulas check if the value in this column equals 1.
{=MIN(IF($A$2:$A$10=$A11,IF($B$2:$B$10>0,IF($C$2:$C$10=1,$B$2:$B$10,""),""),""))}
{=MIN(IF($A$2:$A$10=$A12,IF($B$2:$B$10>0,IF($C$2:$C$10=1,$B$2:$B$10,""),""),""))}
{=MIN(IF($A$2:$A$10=$A13,IF($B$2:$B$10>0,IF($C$2:$C$10=1,$B$2:$B$10,""),""),""))}
And now it works exactly as I expected.
PS. Excuse me for using semicolons in my examples. My Excel localisation requires semicolons instead of commas (as I see you use in English version).
Regards - McVik

Finding value on a column based on another column and a parameter

I have 3 columns like this:
+-----+----+-------+
| 50 | 10 | 20 |
| 175 | 30 | 17.14 |
| 150 | 25 | 16.66 |
| 250 | 40 | 16 |
| 100 | 15 | 15 |
+-----+----+-------+
What I want to achieve is when I type a value in a completely other box, I want to find the highest value in C column with the value closest (or equal to) among the ones lower than the value I entered.
For example if I write 56 I want 20 to come as a result or 16.66 for 160.
I don't know if I can parametrize the input (56 and 160 in the example above) in Excel. Would be visually better if I could light up the line for the correct value.
I'm sure this is doable in Excel to some extent but I don't know how.
You haven't explained the purpose of column B but based on your question the following would work:
Formula in F2:
=INDEX(C1:C5,MATCH(MIN(ABS(A1:A5-E2)),ABS(A1:A5-E2),0))
Note It's an array formula which need to be confirmed through CTRLSHIFTENTER
Without pressing CSE, you could use the following formula:
=INDEX(C1:C5,MATCH(MIN(INDEX(ABS(A1:A5-E2),)),INDEX(ABS(A1:A5-E2),),0))

Excel formua like SUMIFs with criteria in different tables

I don't know if I am missing something obvious or what, but I cannot wrap my brain around what I need from this. I have a table with products available for sale and various criteria. I have a second table with a smaller list of stores and a second column of whether I should include them in my results set. In this example, I would never include store 789, but I might include 123 and/or 456, depending on whether an "x" was placed in that second column.
So, for my results, I would break them out by Product and color with a simple SUMIFS statement. However, I really want to be able to filter the sites out if they are "x" on that second tab. Any thoughts on how I could easily do that? I did insert a column on my raw data sheet and just added an if statement, then I used that as a 4th criteria in my SUMIFS, but I was looking for a more elegant solution.
I can get either matching stores or the rest of the filters, but I cannot figure how to make both work together in the same statement or how to include them if they are "x"-ed.
This will get me the filtered stores
=SUMPRODUCT(SUMIF('Tab1'!A:A,'Tab2'!A:A,'Tab1'!D:D))
Either of these will get me the filtered products:
=SUMIFS('Tab1'!D:D, 'Tab1'!B:B, A2, 'Tab1'!C:C, B2)
=SUMPRODUCT(--('Tab1'!B:B=A2), --('Tab1'!C:C=B2), 'Tab1'!D:D)
Tab1
Store | Product | Color | Sales
--------------------------------
123 | A | Red | 1
123 | A | Blue | 2
123 | B | Red | 4
456 | A | Blue | 8
456 | B | Red | 16
789 | A | Red | 32
789 | B | Red | 64
Tab2
Store | Include
---------------
123 |
456 | x
Results:
Product | Color | Sales
------------------------
A | Red | 0
A | Blue | 8
B | Red | 16
Why not use VLookUp's to add the column from Tab2 to Tab1?
For example, new Column E, to the right of Sales:
=VLookUp(A1, "Tab2", 2, False)
...and fill-down?
You could base SumIf criteria on multiple tables but personally I'd just keep the data together (dynamically) just to make it easier and neater.
Build a pivot table and use slicers to include or exclude specific data. Then you don't need a helper table and you don't need formulas, either. Just a few clicks.

Excel - Return most occurred value based on based on multiple condition

I have three main column Name, Size, and Diameter. What I want is to filter the name and return the most occurred value in Diameter for a particular value in Size. For example I have a table like below :
| Name | Size | Diameter |
------------------------------
| A | 30 | 2232.23 |
| A | 30 | 2232.23 |
| A | 30 | 5382.98 |
| A | 29 | 1123.44 |
| A | 29 | 9323.42 |
| A | 29 | 1123.44 |
| B | 31 | 1232.11 |
| B | 31 | 1232.11 |
| B | 10 | 1111.00 |
------------------------------
The value that I should be receiving from Diameter for A with the Size of 30 is 2232.23 while for B I should be receiving Diameter value of 1232.11 for Size 31
This is just a sample of it. The actual data is more than 9000+ row.
Thanks.
Considering your data is in column A,B,and C you can put this array formula in cell D1
=INDEX(C$1:C$10,MODE(IF(A$1:A$10=A1,MATCH(B$1:B$10,B$1:B$10,{0,0}))))
Don't forget to press Ctrl+Shift+Enter.
Try Paste in cell D2 and drag to the last row:
=COUNTIFS(A:A,A2,B:B,B2,C:C,C2)
It returns the number of occurrences each row.
Use this formula. Formula first creates array of values that pass 2 set conditions. then IF formula removes 0 values from an array. Lastly MODE formula evaluates remained values and return the one with most occurrences.
=SUMPRODUCT(IFERROR(MODE(IF(--($A$3:$A$11000=G2)*($B$3:$B$11000=H2)*$C$3:$C$11000<>0,--($A$3:$A$11000=G2)*($B$3:$B$11000=H2)*$C$3:$C$11000,"")),MAX(--($A$3:$A$11000=G2)*($B$3:$B$11000=H2)*$C$3:$C$11000)))
Enter it using CTRL+Shift+Enter, since it is an array formula.
if you want to show most occurrences in ColumnD then use this formula in cell D3 and drag it to the bottom.
=SUMPRODUCT(IFERROR(MODE(IF(--($A$3:$A$11000=A3)*($B$3:$B$11000=B3)*$C$3:$C$11000<>0,--($A$3:$A$11000=A3)*($B$3:$B$11000=B3)*$C$3:$C$11000,"")),MAX(--($A$3:$A$11000=A3)*($B$3:$B$11000=B3)*$C$3:$C$11000)))
Here is an array formula (click Ctrl + Shift + Enter together) you can try:
=INDEX($C$2:$C$20,MATCH(MODE(IF(($A$2:$A$20=E2)*($B$2:$B$20=F2)*($C$2:$C$20),($A$2:$A$20=E2)*($B$2:$B$20=F2)*($C$2:$C$20),"")),$C$2:$C$20,0),1)
Basically it is using MODE function to find the most frequent occurance and then use INDEX/MATCH to return the value.

Excel Pivot Advanced How to incorporate multiple columns

I have a table that looks like this -
Key | X | Y | Z
| Date | Date | Date
1a | 01-Jan-16 | 15-Jan-16 |
2a | | 01-Feb-16 |
3a | | | 01-Mar-16
I need to do a pivot on this table, to get a resulting table that looks like this -
Key | Type | Date
1a | X | 01-Jan-16
1a | Y | 15-Jan-16
2a | Y | 01-Feb-16
3a | Z | 01-Mar-16
I've tried multiple versions of Pivot, but they don't get me all the data within these 3 columns. What might the best solution be?
Delete the row with Date. Insert copies of your Key column immediately to the left of your Y and Z columns. Add two adjacent columns at a time using Multiple consolidation ranges, drill-down on the Grand Total intercept and filter the Value column to delete rows with blank cells. Label as appropriate.

Resources