Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Merging Lists or ranges of cells in excel

Posted on 2011-02-28
7
211 Views
Last Modified: 2012-05-11
Greetings all,

I am trying to solve a problem with no VBA at all (this is due to the limitations placed on me by my project

I have cells across spreadsheets that I need to bring under one column.

Therefore, i tried to set up lists for the data, and merge them dynamically using an If statement in an array

=IF(CELL("row")+0>VLOOKUP("Column C Count",A9:B12,2,FALSE)+0,OFFSET(countc,0,0),OFFSET(countd,0,0))

However, when countc has 4 records, then countd has 5, depending on where you are in the master column, the entire row evaluates to that true or false condition

If column C has 1,2,3,4 and D has a,b,c,d,e,f

Then if you are in cell 6 of the array list, and reevaluate, you get a because the if statement evaluates to true, so it should return a, but it evaluates the false path instead, however if you uput the focus of the sheet on the first column, you get 1 as expected

attached is a sample sheet

I am not thrilled about arraylists as I think that is the issue.
Book3.xlsx
0
Comment
Question by:rg20
7 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 34997257
Are you trying this?

=IF(CELL("row")>VLOOKUP("Column C Count",$A$1:$B$4,2,FALSE),OFFSET(countc,0,0),OFFSET(countd,0,0))

Sid
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 34997260
Paste the formula in Cell H1 and drag it down.

Sid
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 34997394
Did you mean something like this?
Book3.xlsx
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 34997418
Try this file

Saqib
Copy-of-Book3.xlsx
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 34997428
Wow, we have company.... or crowd
0
 
LVL 9

Author Comment

by:rg20
ID: 34998618
Sid, your answer was my initial try, adding 0 would convert it to ensure integers are being compared.  The if statement in an array list doesn't work as I hoped
Rorya, thanks for the solution
ssaqibh, You solution was excellent as well, but rorya got you by 4 minutes, sorry, and thanks all
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 34998856
What matters is that it is working.

Cheers

Saqib
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

792 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