Consider a spreadsheet with a "source" spreadsheet and a "formatted" sheet
The formatted sheet references data from a source sheet.
The ideal way for this to work is to use array formula
# formatted-sheet (formulas)
| title | description |
------------------------
| = ArrayFormula(source!A2:AA) | |
| | |
| | |
# source (raw data)
| title | description |
------------------------
| SomeTitle | long description |
| OtherTitle | Other description |
| emptyDesc | |
In google spreadsheet, the resulting formatted sheet displays like this :
# formatted-sheet (rendering formulas)
| title | description |
------------------------
| SomeTitle | long description |
| OtherTitle | Other description |
| emptyDesc | |
However after exporting to Excel format, the empty values are displayed as "0"
# formatted-sheet (rendering formulas)
| title | description |
------------------------
| SomeTitle | long description |
| OtherTitle | Other description |
| emptyDesc | 0 |
| 0 | 0 | # for every additional line captures by the array formula, zeroes everywhere
The fix I found for this, is to use an IF to check for empty string values
# formatted-sheet (formulas)
| title | description |
------------------------
| = ArrayFormula(IF(source!A2:AA = ""; ""; source!A2:AA)) | |
| | |
However the IF() formula is broken for cells that are longer than 255 characters, Is there a different workaround possible ?
Foe example a way to rpevent the empty strings to appear as "0" after exporting to xlsx and opening with Microsoft Excel ? or to improve the formula ?
Here is the reference for a sample sheet.
Try using:
=ARRAYFORMULA(IF(NOT(ISBLANK(source!B2:B)),source!A2:AA,""))
it also hides the last "emptyDesc". If this is not your intention please let me know.
I found out this trick from this question that is quite concise to convert everything to a text like format.
=ArrayFormula(source!A2:AA & "")
However it will most likely kill the formatting of numbers and interoperability, I have not made extensive tests regarding this, as it is fine for me in the current state
My data looks like below. I have Groups that I share topics each day. We do this randomly based on need.
| | Topic 1 | Topic 2 | Topic 3 | Topic 4 | Topic 5 | Topic 6 | Topic 7 | Topic 8 | Topic 9 |
|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|
| Group 1 | | 19-apr | 30-apr | | | | | | |
| Group 2 | 18-apr | 25-apr | | | | | | | |
| Group 3 | | | | | 19-apr | 30-apr | | | |
| Group 4 | 18-apr | 25-apr | | | | | | | |
| Group 5 | | | | | | | 19-apr | 30-apr | |
| Group 6 | | | 25-apr | | | | | | |
| Group 7 | 18-apr | 25-apr | | | | | | | |
For our metrics & analysis, we need a list of groups per date on a different sheet. We like to know which all groups were engaged a given day. Like below
Can somebody please help me how I can get this done with only using formulas and without macros?
I believe this can somehow be handled on Index Matching or look-ups.
You could definitely do this with macros. You can do something similar without macros; it may not be precisely what you were looking for because it will leave blank space where groups were not addressed.
Method 1
Here is the formula I used and a picture of the sheet it is in:
=IF(IFERROR(MATCH(L$4,$B6:$H6,0),FALSE),INDEX($B$5:$B$13,MATCH($K5,$B$5:$B$13,0),1),"")
The idea is that if you have absolute references alongside your list of groups per date, then you can use index and match to fill in that group's name, but only if Match finds that precise date code in that group's row from the previous table. If you place an equivalent formula in the first cell, you can drag it out to the rest of the array.
The formula I used is not the only way to do this, but if you know Index and Match, then it should make sense to you.
Method 2
A more convoluted method would be to use image references. With these, it is possible to make the report precisely what you asked for on a separate sheet.
Suppose you took Method 1 and separated each column out into a different table. Nearly the same formula inside the cells below the date heading, except that you enclose the heading reference in int() as shown below. Create one table for each of N dates, where N is the number of days you want to monitor at once. Then when you want the summary to show you different dates, you go to each table and change the heading, and filter out blanks.
formula:
=IF(IFERROR(MATCH(INT($L$2),$B4:$H4,1),FALSE),INDEX($B$4:$B$11,MATCH($K3,$B$4:$B$11,1),0),"")
The below image shows what I mean by one table for each date:
Then you insert an image. Doesn't matter what image; could be a screenshot of anything. Click on that image, then click into the formula bar. Then highlight the table column you want it to represent. Below is a screenshot of how to to that:
Now place that picture on its own sheet in the workbook. Place each date table on its own sheet in the workbook. The reason you do this is: if you filter a table, everything else overlapping the filtered rows outside the table will also be hidden. You move tables to separate sheets to prevent them from hiding each other.
Finally, arrange your pictures into the order you like, filter the blanks out of the tables, and your images will be exactly what you were looking for:
Again, this is a little convoluted because if you want the report to show you new date summaries, you would have to change the headings on every table. Then you would have to go to each table and refresh it's filter. This is where macros usually come in.
Assume range A1:J8 housed your Source table, and L1:P8 housed the Date/Group Output
1] In L2, copied across :
=IFERROR(1/(1/AGGREGATE(15,6,$B$2:$J$8/($B$2:$J$8>K$2),1)),"")
2] In L3, copied across to P3 and all copied down :
=IF(L$2="","",IFERROR(INDEX($A:$A,AGGREGATE(15,6,ROW($A$2:$A$8)/($B$2:$J$8=L$2),ROW(A1))),""))
You can use the following formula to get a list of dates from a table:
=IFERROR(AGGREGATE(15,6,($B$2:$J$8/($B$2:$J$8*(COUNTIF($A$15:A15,$B$2:$J$8)=0)))*$B$2:$J$8,1),"")
To get a list of groups by date, use the following:
=IFERROR(INDEX($A$1:$A$8,AGGREGATE(15,6,(1/(B$15=$B$1:$J$8))*ROW($B$1:$J$8),ROW(A1))),"")
I have a table in an Excel sheet that is made up of 4 columns. Columns 2-4 have formulas in them. The 4th column has temperatures in it, and once it hits a certain temperature range I would like columns 1-4 (preferably) to copy over into another sheet.
How can I do that? I have tried to do a vlookup, but I don’t think it works because of the formulas in columns 3 and 4.
Do you have an example of data?
All i can think off is an lookup inside an 'If' statement
Eg.
| Column1 | Formula | Formula | Temperature |
| Text | text | text | 20 |
| Text | text | text | 25 |
| Text | text | text | 30 |
so maybe a helper column to the right
| Column1 | Formula | Formula | Temperature |Helper column |
| Text | text | text | 20 | 0 |
| Text | text | text | 25 | 1 |
| Text | text | text | 30 | 1 |
with the formula
=if(Temperature>"value","1","0")
=if(Temperature>"24","1","0")
Then use an if in your new column on different sheet saying
=if(Helper column = 1, column1, "")
In your new table
Hopefully that makes a bit of sense although it is tricky without seeing example data.
if you are ok with VBA this could probably be way easier to do!
I am forming a chart from sheet A. Sheet B contains all my data.
I want to exclude a specified date(s).
Sample data:
+---+----------+--------------+--------------+-------------+-------------+-------------+
| | A | B | C | D | E | F |
+---+----------+--------------+--------------+-------------+-------------+-------------+
| 1 | Date | 29/03/2017 | 30/03/2017 | 31/03/2017 | 03/04/2017 | 04/04/2017 |
| 2 | Number 1 | -594590.4649 | -636666.4504 | 795637.1614 | 842563.4322 | 496463.9301 |
| 3 | Number 2 | 2189587.44 | 1301681.418 | 2080839.353 | 1945335.214 | 2421728.123 |
+---+----------+--------------+--------------+-------------+-------------+-------------+
The final output would be me excluding 30/03/2017 , and keeping the rest in my data selected for my chart.
the issue is that I want to maybe exclude a date in the middle of my selected range. But since this may be a hassle to input a long formula each time into my data selected. I would like to see if there is any formula/function to eliminate a specified date/column. Perhaps manually enter the column you want to exclude in a formula.
My current range is something like =Graph!$AB$5:$KA$7 But is there a function to exclude one of these columns?
I can manually select which dates with Ctrl but seems tedious.
I have a table like so (the first column):
| Table | What I want to achieve |
|--------|------------------------|
| 088888 | convert to number |
| 88888 | convert to number |
| 588888 | convert to number |
| 688888 | convert to number |
| V44100 | ignore and return text |
| W44101 | ignore and return text |
| S54001 | ignore and return text |
| V44102 | ignore and return text |
| BOLUTY | ignore and return text |
| SHOLIA | ignore and return text |
|--------|------------------------|
The table is generated from a database so all numbers comes formatted as text.
I want a formula that will help convert all text-formatted-numbers to numbers like the first 4 numbers in the cell above. the formula should be smart enough not to try to convert text to numbers, i.e when it encounters a text it should return the actual text.
I tried to use =VALUE(A1), while it works for the first 4 numbers above, it returns #VALUE error when it encounters real texts (last 6 texts in column A of the table above.
I have another formula like this (IF(OR(LEFT(A1)='1',LEFT(A1)='2',VALUE(A1),A1) This works as desired but it will be too long as I want to test for prefix numbers 0 through 9 i.e IF(OR) 0,1,2,3,4,5,6,7,8,9 etc
Is there a shorter/simpler way of achieving this without using the above unusually long formula?
Thanks.
As I mentioned in the comments use the error checking to do a mass conversion but if you still insist on a formula then here it is.
=IFERROR(INT(A1),A1)
EDIT: If you have decimal values in Col A then use VALUE instead of INT