Identify errors between two worksheets - excel-2010

I have two sheets in same workbook. Sheet1 is having the data to be updated and sheet2 is having the data after the update. I want to highlight the errors in Sheet2, with comments beside the cell "E" as Wrong Date Entered. I have tried using VLOOKUP formula but it did not work.
Formula Used: =IFERROR(VLOOKUP(E3,ti,5,FALSE),"Wrong Date Entered")

You could retrieve the date from Sheet1 with a multiple field criteria (using IFERROR to retrieve the new entries) and compare the dates.
      
The formula in SHeet2!F2 is,
=IF(E2=IFERROR(INDEX(Sheet1!$E$2:$E$9,MIN(INDEX(ROW($1:$8)+((Sheet1!$A$2:$A$9<>A2)+(Sheet1!$B$2:$B$9<>B2)+(Sheet1!$C$2:$C$9<>C2)+(Sheet1!$D$2:$D$9<>D2))*1E+99,,))), E2),"", "Wrong Date Entered")
Fill down as necessary. When transcribing for your own purposes, remember that ROW(1:8) is the position within Sheet1!E2:E9, not the actual row on the worksheet.
EDIT:
I opened up the Sheet1 ranges to look at 9999 rows then filtered for the error message and came up with the following.
      
The formula with the larger cell ranges I used was,
=IF(E2=IFERROR(INDEX(Sheet1!$E$2:$E$9999,MIN(INDEX(ROW($1:$9998)+((Sheet1!$A$2:$A$9999<>A2)+(Sheet1!$B$2:$B$9999<>B2)+(Sheet1!$C$2:$C$9999<>C2)+(Sheet1!$D$2:$D$9999<>D2))*1E+99,,))), E2),"", "Wrong Date Entered")
When filling the formula down it did take a few seconds to calculate but I'm only using an older business class laptop so I don't think that the calculation lag was anything completely out of the acceptable range.

You can save both files as pdfs and can compare those files using Acrobat Pro.
Goto View -> Compare Documents..

Related

Count data between two data ranges

I've spent countless hours trying to count this data between two date ranges. I'm using a formula I've previously used in the past, but with no luck.
(Fixed - Sample Data - see updated Actual Data below, formula is not working with actual data)
Current Formula vs. Expected Results
=Query(flatten(filter(E3:E11,D3:D11>=D16,D3:D11<=E16)), "Select Col2,count(Col2) where (Col2 is not null) group by Col2 label count(Col2)''",)
I've tried:
COUNTIFS but could not find how to include criteria.
Using INDIRECT with named range in the 'Expected Results' Reason 1 - Reason 5 Column and COUNTIFS in the column to the right.
Googling over 50+ different sites and formulas.
(Updated: Actual Data) (Error - Not working)
[Current Formula and Empty Result]
(https://i.stack.imgur.com/SnRkm.png)
The actual data is being pulled from the Data sheet. The data on this sheet looks like this
Data on the Data sheet that's pulled onto the date filter sheet
(https://i.stack.imgur.com/yZNh9.png)
and is using this formula:
=ARRAYFORMULA(TRIM(QUERY(SPLIT(FLATTEN(IF(IFERROR(SPLIT(O11:O, ","))="",,TEXT(J11:J,"MM/DD/YYYY")&"×"&L11:L&"×"&M11:M&"×"&N11:N&"×"&SPLIT(O11:O, ","))),"×"),"where Col2 is not null")))
Solution:
I used the same code I previously used. However, the dates that were being selected could not be selected with the data that was being pulled.
I used:
=INT(O3)
to copy the date into another column, dragged the formula down, and used the filter to select the date from this new column. The date filter then worked.

How to get last number in a row on Google Spreadsheets

Spreadsheet
So Basically i'm building a sheet to monitor my NW, my problem is simple, i need the 2023 column to adapt to whatever last number on that row there is, for income i just sum values, but for example the total amount in my bank account is different every month, i just need 2023 column to track that, i update the 31 of each month.
With the formula you can see in the screenshot i have some problem, if i input the number alright, if the value is defined by other formulas it won't show up. Any solutions?
THANKS
Only formula present in the row
Another formula from the comments that seems to not work
I tried =INDEX(X:Y;1;COUNTA(X:Y)) but it won't update if the last number in the row is generated by other formulas.
You can use this formula to find the last value of each row in the range D2:O26. Adapt it as needed!
=BYROW(D2:O26,LAMBDA(e,XLOOKUP(1,INDEX(1/(e<>"")),e,,0,-1)))
Explanation:
BYROW creates an array formula in each row of the range. To each row, here denoted as e, the specified lambda function is applied.
INDEX(1/(e<>"")) returns an array with 1 in places where cell is not empty, and #N/A for empty cells.
XLOOKUP finds the index of the last occurrence (parameter search_mode set to -1) of 1 (first parameter) in the array returned by INDEX and returns corresponding value in the row.
You haven't show what formula in columns Jan-Dec causes you problems. If formula produce values 0 in case you don't what them to count, you can use countif to filter them out:
=INDEX(D13:O13,1,COUNTIF(D13:O13,">0"))
Same as your solution, this only works if columns are filled sequentially - if there are no gaps in each row, e.g. Jan and Mar are filled while Feb is blank.
If you need a more general solution, you may go with series of nested if(isblank(). Here is an example for the first three months, to get an idea:
=INDEX(D13:O13,1,IF(ISBLANK(F13),if(ISBLANK(E13),1,2),3))

Google sheets: inter-sheet formula seems to ignore MATCH criteria... (Copy data from one sheet to another using 1 Match criteria)

I have a Google spreadsheet with 5 tabs (sheets) and I want to copy rows of data from one sheet to another, IF a criteria matches in one of the sheet.
Sheet1 has hundreds of rows of data, across numerous columns. One of the columns lists dates. That column is mostly set to Date format. That date col also uses various Conditional Formatting rules. (I cannot change these or the formatting of this column!).
In sheet5 I have a formula that is supposed to look at sheet1 and find all the rows with a certain date in the date col and then copy the data in that row to a row in sheet5.
It looks like this: =INDEX(sheet1!$A1:$O2002,MATCH($B$1,sheet1!$Q:$Q,0),0)
It kind of works... if I just paste the formula in one cell in sheet5, it finds a row matching the date criteria and copies data over. But if I want to query more of sheet1, by dragging the cell down and find more rows of data to copy over... it just copies all the rows from sheet1 after the initial find... completely ignoring what it's comparing in $B$1 to $Q:$Q... I suspect that what I think it's comparing in MATCH($B$1,sheet1!$Q:$Q,0) may not be what's actually happening, hence the result not matching my expectations...
Here is a screen capture of the sheet I want to copy data from: This sheet is set up and controlled by another party. I CANNOT change data; I CANNOT change data format that is already entered (eg I can't change a col set to Date to Plain Text!) See red notes.
But I can convert Dates in col N to Plain Text in col Q. Column Q is what I am querying/comparing in the formula in the destination sheet (see second screen capture below)
Sheet1 capture: data to copy, criteria date col
In sheet5 I have this formula that queries sheet1:
=INDEX(sheet1!$A1:$O2002,MATCH($B$1,sheet1!$Q:$Q,0),0)
Here is a screenshot of what that formula produces in sheet5
Sheet5 capture: result of using formula
Notice, it kind of works...(when I just paste the formula into my starting cell... it found the one line with the criteria I set) but then if I drag B3 down to query sheet1 more... it just grabs everything, even if $Q:$Q doesn't match the criteria set in B1...
Why?
Any help or clarifying questions are appreciated. Thanks
when dragging you did not lock the rows with $
your formula:
=INDEX(Sheet1!$A1:$Q100, MATCH($B$1, Sheet1!$Q:$Q, 0), 0)
should be:
=INDEX(Sheet1!A$1:Q$100, MATCH($B$1, Sheet1!Q:Q, 0))
coz with your initial formula you just created sort of a "sliding range" by every drag-down. to understand the formula... you are indexing range A1:A100 (from row 1 to row 100) where you narrow it down to just 13th row (MATCH outputs row 13 coz there is the match found. next you drag down and indexing range changes to A2:A101 but the MATCH formula always outputs 13 so 13th row from range A2:A101 is row 14, etc.
anyway, use this in Sheet5!B3 after you delete everything in B3:B range:
=FILTER(Sheet1!A:P, Sheet1!N:N*1=B1*1)

Count the Occurences of a text for the whole spreadsheet

I have a spreadsheet where in every column I have a list of names. They can repeat, and whats even worse - cells can contain some additional text (apart from the name).
What I want to do is count the occurrences of the name in the whole spreadsheet (only looking at the name, omitting the potential additional text). Is Possible?
I tried the formula =UNIQUE, but it does not work vertically (I'm working with Google Sheets)
Example of a document https://docs.google.com/spreadsheets/d/1STtJr0yisSeuv2w8_JVgQABAL5EDzI8aFmH8Vp2cOko/edit?usp=sharing
You can use Countif, Arrayformula, and Regexreplace to accomplish this task
Assuming you have the data range from A2:E12 and the prefilled unique names starting from A14
Formula:
=countif(ARRAYFORMULA(regexreplace($A$2:$E$12,".\(.*","")),A14)
Copy the formula until the last row
Hope it helps!
I'm sure that others will provide a much more elegant solution but this takes the data as presented in the spreadsheet and can be implemented in just a few minutes.
Paste this formula in Cell F3
=FILTER({A3:A13;B3:B6;C3:C5;D3:D5;E3:E5;A18:A21;B18:B20;C18:C20;D18:D20;E18:E19}, LEN({A3:A13;B3:B6;C3:C5;D3:D5;E3:E5;A18:A21;B18:B20;C18:C20;D18:D20;E18:E19}))
This creates a single column list compiled from the various smaller lists.
Highlight the range of names created in Column F (based on the test data = F3:F41), click Copy,
Highlight cell G3, click Paste special (Paste Values only) - this converts the formula to a list for entries.
Paste this formula in Cell H3 - this removes any data in brackets
=left(G3,iferror(search(" (",G3)-1,len(G3)))
Copy the formula down as many rows as there is data in Column G
Paste this formula in cell I3 - this lists the unique names
=unique(H3:H41)
Paste this formula in cell J3 and copy down as many rows as there is data in Column I - this counts the number of instances of each unique name in the master list.
=COUNTIF(H:H, I3)

Attempting to Query only data from cells that are not blank

I have a google spreadsheet with 2 sheets. The first sheet contains data that has been input by a form. Each form response will input data for the following "Timestamp", "Zone", "NPC", "Faction", "Amount", "Faction2", "Amount2", "Faction3", "Amount3", "Faction4", "Amount4", "Faction5", "Amount5".
Row 1 contains the above category names for each response input. The way the form works unfortunately is that each response is put into it's own column based on what Zone is chosen at the beginning as each Zone has different possible responses for the category. So the data is spread out from Columns C to Columns HC. Each row will only have one response per category name, but the category names are repeated and spread out.
I have been using the following query in Sheet2 to pull the information from whichever "Zone" that is selected from the E1 dropdown in the sheet.
=if(len(E1)=0,"Please Select a Zone in E1",query('Form Responses'!A2:IS,"Select * Where B = """&E1&""" "))
The problem is that it returns the entire Row for the Selected zone so the following information doesn't line up. Is there any way for me to return only the information from the Rows that have data in the cell. This would then line up the data into the correct Column for Sheet2
Below is a link to the Form with some sample data in it, the Cobalt Scar selection lines up as the responses are in the corresponding columns in the data sheet, but Crystal Caverns and Western Wastes do not. You can change selected zone to view the results in Sheet2 E1.
Also the sheet is a copy and can be edited by the public.
https://docs.google.com/spreadsheet/ccc?key=0AqEFpZnTydP-dFNNOV9sRzNRSldDUXRJX1pqSFZRYkE&usp=sharing
I haven't found an elegant solution to this type of problem, but that doesn't mean it's not solvable.
The solution I created on your sheets is easily manageable (only have to update the sheet with the area / column table), but it does take up a little more memory.
How it works:
The ArrangedData tab is the first 2 columns from Form Responses, then the "appropriate" columns (based on the selection made on sheet2; it picks the columns from a lookup on sheet5).
Then ArrangedData is filtered (based on the selection on sheet2 again) into sheet2.
Let me know if you have any questions about it.

Resources