Solved

Merging Lists or ranges of cells in excel

Posted on 2011-02-28
7
213 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

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!

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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.

752 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