Excel Question - Best way to create sub table?
Lets say I have a table with data. I want to create a sub table that picks rows from the source table depending upon criteria.
What is the best way to create the sub table (so that it does not have empty lines in between, if we were to follow a brute force method of creating)
thanks
vlookup
or h-look up if you're nasty
Guess, I am a bit lost - Well Lets say a table is:
A Q1 2005 B Q2 2005 C Q1 2005 D Q4 2005
Now I want to create a table with only Q1's so that it is only two rows: A Q1 2005 C Q1 2005
How do I use VLOOKUP for this? Appreciate it
if it's in order so that Q1 rows repeat every 5 lines use the offset function
Im sure there's a function to do what you need, such as the above mentioned ones, but a pretty simple macro would also do the trick.
VLOOKUP is your answer. Are you really too lazy to Google that?
you could make a pivot table too
pivot table would work, but for this VLOOKUP works great...i actually have the VBA book sitting in front of me :)
=SUMPRODUCT(($A$1:$A$4=$A10)($B$1:$B$4=$B10)C10)
This assumes your new table starts in row 10 and the combinations in columns A and B are unique.
Or you can concatenate columns A and B, then use vlookup.
Iusto vel corrupti aut asperiores velit quae. Sunt dolorem magnam velit perferendis. Dignissimos provident autem esse. Maxime repudiandae esse voluptas hic ducimus sit. Delectus omnis commodi unde vitae recusandae. Ut quia facere est sit quis.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...