Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2014, 09:08 PM
Loran Loran is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 64bit
Novice
How to replicate, consolidate and count cell data in excel for data consoldation.
 
Join Date: May 2014
Posts: 4
Loran is on a distinguished road
Default How to replicate, consolidate and count cell data in excel for data consoldation.

Hi :

I had been trying to replicate the result as per row 8 below but failed. Can anyone help ?

1.) Replicate Row 3 column data left to right till the number 0 ignore the rest of the data after 0 for the 1st set of data correspondingly to row 8.
2.) Replicate row 4 column data start after where row 3, 1st set of data ends till number 0 as per (1) to row 8 correspondingly.
3.) Repeat the same for row 5 and 6 onward as per steps (2 & 1) till column K.
4.) Count from left to right row 8 the number of columns it takes to reach 0. Update count result to row 10.
5.) Count the number of occurrence the row 10 data have that is >3 to row 12.

1 A B C D E F G H I J K
2 Date 1 2 3 4 5 6 7 8 9 10
3 Ivan 0 23 12 14 0 21 11 55 0 21
4 Susan 15 12 25 0 17 20 26 0 12 14
5 Henrik 11 0 15 15 26 35 31 0 15 12
6 Tommy 12 15 24 15 0 11 15 18 48 25
7


8 Result 0 12 25 0 26 35 31 0 48 25
9
10 Summary 1 3 4 2
11
12 >3 1

Regards
Loran
Reply With Quote
  #2  
Old 06-02-2014, 09:10 AM
BobBridges's Avatar
BobBridges BobBridges is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I started out with an attempt at understanding your description, and filling in where I needed to with guesses. While I was writing those guesses in this space, the light dawned. Here's what I think you mean. (Really, it'd have been a lot easier had you included more punctuation.)
Quote:
I have some data that looks like this:
Code:
   A        B   C   D   E   F   G   H   I   J   K
 1 Date     1   2   3   4   5   6   7   8   9  10
 2 Ivan     0  23  12  14   0  21  11  55   0  21
 3 Susan   15  12  25   0  17  20  26   0  12  14
 4 Henrik  11   0  15  15  26  35  31   0  15  12
 5 Tommy   12  15  24  15   0  11  15  18  48  25
I'm trying to construct row 8 as follows: Fill in the values column by column from the above rows, starting with row 2 until and including the first 0. Fill in subsequent columns in row 8 from the row 3, again until and including a 0; then continue with the following row, and so on until you get to column 10.

Using the above data, a 0 appears immediately on Ivan's line, so line 8 would look like this:
Code:
   A        B   C   D   E   F   G   H   I   J   K
 2 Ivan     0  23  12  14   0  21  11  55   0  21
 8          0
Then we take up with the next column using Susan's row, and stop with the next 0:
Code:
   A        B   C   D   E   F   G   H   I   J   K
 3 Susan   15  12  25   0  17  20  26   0  12  14
 8          0  12  25   0
And so on:
Code:
   A        B   C   D   E   F   G   H   I   J   K
 4 Henrik  11   0  15  15  26  35  31   0  15  12
 8          0  12  25   0  26  35  31   0

   A        B   C   D   E   F   G   H   I   J   K
 5 Tommy   12  15  24  15   0  11  15  18  48  25
 8          0  12  25   0  26  35  31   0  48  25
Once you have line 8 as defined here, count the length of each sequence up to and including 0, and put the result in row 10. Like this: The first 0 occurs immediately, so the length of that sequence is 1. The next sequence is 12, 25, 0; the 0 ends that sequence, so its length is 3. Then 26, 35, 31, 0, that's 4 long; last 48 and 25, which is two long. (It doesn't end in 0, but you can presume a 0 in column L.) So row 10 looks like this:
Code:
   A        B   C   D   E   F   G   H   I   J   K
10          1   3   4   2
Once I have row 10, I want to know how many of the values in row 10 are greater than 3—just 1 of them, in the above example.

How do I do all that?
Is that an accurate description of what you need?
Reply With Quote
  #3  
Old 06-02-2014, 08:08 PM
Loran Loran is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 64bit
Novice
How to replicate, consolidate and count cell data in excel for data consoldation.
 
Join Date: May 2014
Posts: 4
Loran is on a distinguished road
Default

Yes that is exactly what I need.
Reply With Quote
  #4  
Old 06-04-2014, 07:43 AM
BobBridges's Avatar
BobBridges BobBridges is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

And do you need just the final answer (ie 1), or are the intermediate numbers important too?

All this is easy enough to do in VBA. How to do it with formulae...well, I'm sure it can be done, but it'd take some work. Are you up for a programmed solution, or do you want it in formulae?
Reply With Quote
  #5  
Old 06-04-2014, 08:00 AM
BobBridges's Avatar
BobBridges BobBridges is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Here's a sample solution using formulae. The first part, to get your row 8 (my 9) turned out to be simpler than I thought. The whole thing is a little kludgy; I'd probably write a worksheet function, myself, especially if the actual data is much, much larger.
Attached Files
File Type: xlsx x.xlsx (9.8 KB, 13 views)
Reply With Quote
  #6  
Old 06-04-2014, 04:55 PM
Loran Loran is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 64bit
Novice
How to replicate, consolidate and count cell data in excel for data consoldation.
 
Join Date: May 2014
Posts: 4
Loran is on a distinguished road
Default

Thanks for the write-up this option may work. Below are my reply on the queries posted and refinement require.

1.) The intermediate numbers in Row 8, Row 10 and Row 12 are require.

2.) When I changed the data in the attached file for Ivan and Susan as per below, row 8 result did not change correspondingly.

Ivan 23 15 0 15 22 0 55 40 10 21
Susan 15 0 15 30 0 15 10 75 13 12
R8 0 12 25 0 26 35 31 0 48 25

3.) Noticed that in row 7 the 1st data is preset as 1 is that the reason why the data do not change when the conditions are changed ?

4.) The data is larger than the example that can be expand accordingly once the formula is establish.
Reply With Quote
  #7  
Old 06-04-2014, 07:22 PM
BobBridges's Avatar
BobBridges BobBridges is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

2) When I change data for Susan and Ivan, the results rows change immediately. Do you have calculation set on manual or automatic?

3) R7C2 is set to 1 because it can't add anything to the previous column (which is text), and the first number in that row should always be 1. But I don't think this should cause any trouble; my theory (see above) is that something else is causing that problem.
Reply With Quote
  #8  
Old 06-05-2014, 01:07 AM
Loran Loran is offline How to replicate, consolidate and count cell data in excel for data consoldation. Windows 7 64bit How to replicate, consolidate and count cell data in excel for data consoldation. Office 2010 64bit
Novice
How to replicate, consolidate and count cell data in excel for data consoldation.
 
Join Date: May 2014
Posts: 4
Loran is on a distinguished road
Default

Had re-open the attachment and rerun again. You are right the data changes accordingly when inputs conditions were changed.

Great, the system formulated works I had learn something new. Previously I was trying to use consolidate condition which may not be suitable.

Thanks for the great job, you help is greatly appreciated.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to populate cells in Sheet2 with Data Source query using cell data from Sheet1 bobznkazoo Excel 2 03-27-2014 11:14 AM
How to replicate, consolidate and count cell data in excel for data consoldation. Excel 2007, highlight entire row based on data found in one cell MSofficeBLUE Excel 2 10-15-2013 09:51 PM
How to replicate, consolidate and count cell data in excel for data consoldation. Excel Cell Data in a Word doc Jagobezzer Word 1 09-30-2013 06:18 AM
How to count the frequency of data and also tally value from an array of Excel record KIM SOLIS Excel 5 09-07-2011 09:01 AM
How to count cells containing data and meet certain criteria AdamNT Excel 1 08-11-2006 11:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft