Solved

Merging Lists or ranges of cells in excel

Posted on 2011-02-28
7
214 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
[X]
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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

636 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