Solved

Excel Formula to find what is missing

Posted on 2013-02-01
9
170 Views
Last Modified: 2013-02-06
I have a list in one column, of form names.
Each form should have a correspond state code in the column next to it.

Every form should be listed 50 times, each with only one state next to it.

Is there a non-VBA formula that checks for that and tells me what is missing, either form or state?

It can be 2 different formulas, one checking for missing forms, and one for missing states

example attached
Book3.xlsx
0
Comment
Question by:newparadigmz
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 10

Expert Comment

by:Anthony Berenguel
ID: 38844415
You can count each state using countif(), or you can lookup each state to make sure its in your list with vLookup().
0
 
LVL 3

Expert Comment

by:Nalinkumarbalaji
ID: 38844434
Please check the attached file having the formula updated
Book3.xlsx
0
 

Author Comment

by:newparadigmz
ID: 38844686
i am looking for something that will tell me what form/state combination does not exist
0
 
LVL 3

Expert Comment

by:Nalinkumarbalaji
ID: 38844803
In the Excel sheet what i have attached will display the value with N/A for Forms and States which is not Exists in the Whole List.

sample Forms: =VLOOKUP(A2:A10,H:H,1,0)
Sample States: =VLOOKUP(D2:D10,I:I,1,0)

If you want the excel to automatically listed into the Another Sheet. Then for that you have to do VBA code, or some front end application (Vb.net) to achieve this.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 7

Expert Comment

by:leptonka
ID: 38845817
Hi,

If I understand well, you would like to check the form-state combinations?
I created a file with a possible solution using formulas.
In column F and G you find array formulas, so make sure both is confirmed with Ctrl+Shift+Enter into a large range of cells.
In column H there is a check formula showing "missing" for the combination does not exists under the Actuals list.

Cheers,
Kris
Find-missing-solution.xlsx
0
 

Author Comment

by:newparadigmz
ID: 38851421
Yes!

But can you please explain if you can, because I can never implement something I don't understand.

I get that you are multiplying the number of forms (9) by the number of rows (6) to get 54.
Then you are creating the range 1:54.
The -1's and +1's are to account for the headers.
And Index is to pluck the value.

But, what is the mechanism/logic that cycles through the sets to get each form 6 times and each state 9 times? I guess that's the Int and Mod parts, but I still can't wrap my head around it.
0
 

Author Comment

by:newparadigmz
ID: 38851916
Also, is there a limitation to this formula?

It works for me up until I hit 700 + rows.

My actual data has 317 forms, 52 states.
0
 
LVL 7

Accepted Solution

by:
leptonka earned 500 total points
ID: 38852741
Hi,
So explanation first:
To create all the possible combinations, I choose the first value form Forms and combine with all the values from States. So I need to repeat this first Form as many times as the number of elements of States. Then I get need the next form.
I use INDEX function so I need the index numbers. Following the above logic, I need to repeat number 1 as many times as the elements of States. Then I repeat number 2, 3... To have this index-vector: 1.1.1.1.1.1.2.2.2.2.2.2.3.3.3.3.3.3 .... I use the INT function. I take the series: 0.1.2.3.4.5.6.7..... which is the result of ROW function, I divide it by the number of elements in States :ROWS(States) and calculate the integer part with INT.
Similarly for States: I have to go through all the elements of states for each element of Forms, so I need this index vector: 1.2.3.4.5.6.1.2.3.4.5.6.1.2.3.4.5.6 because in the example there are 6 elements in states. This will be the result of the MOD function.

If you have many rows in forms and states, better to use a copy-down formula. I created another solution, based on exactly the same logic, but using normal row numbers. In this case it is important that the header row is one row above the first row - it makes possible to have a series of numbers starting from 1.
You should copy these formulas down to 317*52=16484 rows.

I hope it helps and you understand my explanation.

Cheers,
Kris
Find-missing-solution.xlsx
0
 

Author Closing Comment

by:newparadigmz
ID: 38860858
Amazing!

I still don't fully follow the math part, but now I understand that it is the row number of the cell that the formula resides in that drives the "changing" of values.

Can you recommend a resource to learn about these kinds of techniques?

Thanks so much
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now