Summing Uneven Blocks Of Rows
Apr 21, 2006
I am trying to Sum "uneven blocks of rows" using the Sum Function.This works OK for the 1st.Block,but then the selection of cells moves down the same number of rows as the 1st Block.
I am attaching a sample file which best explains what I am trying to achieve.
View 9 Replies
ADVERTISEMENT
Jul 16, 2014
I am trying to average different rows and columns within a larger block data set in a series. This data is from a 96-well absorbance microplate reader experiment. I only mention this to describe the raw data output I am dealing with.
Each set of data is in a 12 x 8 block with the next block below it with one blank row between. So I have a block of data contained between A1->L1->L8. The next block is contained between A10->L10->L17. This continues for a total of 28 blocks.
I want to take averages from rows or columns from each block and autofill them into a single column. So for example I'll need =Average(A1-C1) with =Average(A10-C10) below it and so on and so forth. My problem is that if I try to autofill from this already started column the third row will take the average of A2-C2 instead of A19-C19.
Is there a formula/script for me to skip the correct number of rows to the next data block?
I have attached my spreadsheet to this thread. I am using Excel 2013
FeS_Kinetics.xlsx
View 1 Replies
View Related
Apr 27, 2006
I have a worksheet that collects information from another using complex formulas.
In column A I have codes i.e. PRD001A, PRD001B etc. A block of codes starts at A and can go up to Z. i.e. PRD001 could start WITH PRD001A and finish with PRD001N then there is always a PRD001W and PRD001Z to finish with.
PRD002A would follow PRD001Z and might only have A, B, W & Z codes before PRD003A.
In column K is the sum of columns D:J.
What I want is a macro that will look at column A & K and if all OR some of the codes for say PRD001 are >0 don't delete any of the rows for that group of codes.
Then look at column A & K and if all of the codes for say PRD002 =0 delete all of the rows for that group of codes.
View 9 Replies
View Related
Jul 1, 2009
What I'd like to do is to have the block of rows starting from "Agent:" and ending with "Total" copied into a separate worksheet and then have the worksheet named using the agent's name. I have highlighted the data in yellow in the attached reference file. I would like to have this done for all 58 agents. I could copy and paste manually but that wouldn't be the smartest way to go about this. I figure I probably need a looping structure for this but I am not yet proficient enough to figure this out quickly. I am supposed to have this done today.
Edit: The last part of this would be to have blocks of rows from the "sections" worksheet which use identical agent names also pasted below the data from the "questions" worksheet. I have attached the workbook I am working on now cutting and pasting manually.
View 4 Replies
View Related
May 11, 2006
I have used some code that Kris gave me a couple of weeks ago and changed it to insert a row between each block of information. Have I got it right?
Sub InsertRows()
Dim lRow As Long
Dim r As Long
lRow = Range("A" & Rows.Count).End(xlUp).Row
Application. ScreenUpdating = False
Columns("M").Insert
[m3] = "temp1"
Range("M4:M" & lRow) = "=LEFT(A4,5)"
For r = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(r, 13) <> Cells(r - 1, 13) Then Rows(r).Insert Shift:=xlDown
Next r
Columns("M:N").Delete
Application.ScreenUpdating = True
Application.DisplayAlerts = False
ActiveWorkbook. SaveAs Filename:= _
"H:HOME imcEXCELCOUPON_COUNT5_MAYREFORECAST.xls", FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Application.DisplayAlerts = True
ActiveWindow.SelectedSheets.PrintOut copies:=1
End Sub
View 3 Replies
View Related
Nov 15, 2006
Moving Data And Deleting Blank Rows. I am a complete newbie to excel VBA and require assistance (if at all possible). I have data in the following format in an excel sheet (I have a lot more rows but give an example for two rows)... in 1 column but I wish to separate it (i.e. move data along onto the first row in other columns) and delete blank rows.
For Example:
Col1
AAAA
BBBB
CCCC
DDDD
EEEE
AAAA
BBBB
CCCC
DDDD...............................
View 9 Replies
View Related
Aug 1, 2014
I have a list of Spid numbers and a service category identifying if it is a Water Spid or a Waste spid.
The Spid is split into 2 parts. The Core is the identifier and the Category states if it is a Water or a Waste spid.
If the 1st digit in the Category is a 1 = Water.
If the 1st digit in the Category is a 2 = Waste.
There may only be a water spid or a property may have a water and waste spid.
What I want to do is have the information on 1 row rather than 2 rows
I have data in this format
SPID
Core
Category
Service Category
100000000151
100000000
151
1
[code].....
and I need to convert it into this format.
Core spid
Water
Waste
100000020
100000020101
100000020251
I have tried IF(lookup) and it works for the 1st row but I can't get it to look at the 2nd row.My data consists of 400,000 plus rows
View 3 Replies
View Related
Jan 5, 2009
In my procedure I have a for ... next loop with "For i = 1 to Number"
How can I determine the value of i during this loop.
Whenever i is uneven some cell have to change color, if i is even cells remain unchanged.
I have most of the code figured out, except for this part
View 8 Replies
View Related
Jun 25, 2014
What I need to do is have the numbers on the x axis count up with a even increment. For example, 1,2,3,4,5. That part is easy and I can do that, the next part is not.
Next I need the X axis of my graph to have, what the graph I'm trying to replicate calls, a "squared scale". So the numbers need to look like what is above but be spaced in squared intervals.
It would look something like this: 1 2 3 4 5... note the spacing between each is increasing.
Below are pictures showing how the book does it by hand.
20140625_085909_zps204851fe.jpg
20140625_085922_zpsbc03f1bd.jpg
I think I could get it to look like this with a dummy series with the axis labels listed but I need to be able to have a point read off the actual values so the dummy axis wont work.
View 5 Replies
View Related
Dec 13, 2012
I want to separate data in cols A,B,C to match my results in cols D,E,F,G .
Have tried using left , mid , right functions but data is not evenly matched .
The most important parts I need is the results in cols D , E and G
Sheet1 ABCDEFG1ABCResult AResult BResult CResult D23SurvivedJonathan Riddell3SurvivedJonathan Riddell 37RacquetorCraig Grylls7RacquetorCraig Grylls 42KodemaOpie Bosson2KodemaOpie Bosson 56-Clutha Lad-Shane Dye(2.5L), 6Clutha LadShane Dye2.568-Viceroy-Johnathon Parkes(3L), 8ViceroyJohnathon Parkes3711-Omana-Rory Hutchings (a)(5L), 11OmanaRory Hutchings589-Sunbeam-Matthew Cameron(6L), 9SunbeamMatthew Cameron6912-Zulou-Kelly Myers(7.8L), 12ZulouKelly Myers7.8105-The Sheriff-Hayden Tinsley(12.6L), 5The SheriffHayden Tinsley12.61110-Inazuma-Bridget Grylls (a3)(12.9L). 10InazumaBridget Grylls 12.9
View 6 Replies
View Related
May 13, 2013
I have a spreadsheet which contains 6000 rows where column A1 lists a name, B1 an address, C1 an amount and B2 the 4-digit zip code and place. Now I want to move the content of B2 to D1. I can't use offset because the spacing of the zipcode cell is not always the same.
View 4 Replies
View Related
Oct 10, 2009
I would normally sort out using Text to Columns, but I can't in this case as the remaining elements can vary.
I have a list of names with Forename and Surname and then the elements after that vary.
Names are written in one cell under a single column like so:
John Smith 13/04/2000
James Smith 123 123 1233
Jane Smith 07122 12345
Another Smith AB99 9CD
All I want to do is end up with 3 columns of data,
Forname | Surname | Other
Is it possible to use a formula to make the breaks into each column at the first 2 spaces only, therefore the contents after the second space would just end up in one cell?
View 9 Replies
View Related
Apr 22, 2012
ABCDE122334658677482910211126139145154161718
Trying to get the sum in the highlighted rows of the numbers in the column between the highlighted rows.
View 9 Replies
View Related
May 29, 2008
I have a chart with multiple bundles of rows....
Variable $500
Fixed $400
Step $500
Total $1400
Variable $500
Fixed $400
Step $500
Total $1400
Variable $500
Fixed $400
Step $500
Total $1400
Total Variable $________
Total Fixed $________
Total Step $________
Is there a formula that can help me sum up a total value for the Variable amounts? IE. Variable, Fixed, Step in column A; Dollar amounts in column B
Is there a formula that can recognize the word "Variable" in column A and then pull the number from the adjacent cell in column b?
Want to avoid having to Ctrl+click the hundreds of cells that I would have to in order to do a simple calc =sum(b1, b4, b7, b10) etc. if you know what i mean.
View 9 Replies
View Related
Jan 29, 2010
CCTRCCTRCCTRCCTR112#112NB114#114NWSales group112112114114MONTHQTRYTDNielsen ID#NB##JAN109Q10920091/2/20092894.1717.161231.644704.9JAN109Q10920091/5/20093188.9544.22766.313039.35JAN110Q11020101/6/20092867.92945.571890.774520.44JAN110Q11020101/7/20091927.89210.58484.94960.61RESULTSTABLE 1TOTALS11211410961459742110595211857RESULTSTABLE 2TOTALS112#112NB114#114NW109608361199877441104796115623769481
Table 1 and Table 2 are examples of the results that I need - I have a formula that works for table 2, but when I need to consolidate the numbers as in Table 1 - it won't work - it only views the first 112 or 114 and doesn't sum them together.
the formula that I'm using for table 2 is:
=SUMIF(REV!$B$5:$B$574,"="&$A$50,INDEX(REV!$E$5:$DD$574,0,MATCH($C15,REV!$E$4:$DD$4,0)))
how do I adjust this formula to sum all 112's and 114's in row 3? it sums the columns good, but I need that extra component to make this project work.
View 16 Replies
View Related
Nov 7, 2006
formula in excel to calculate payback and discounted payback periods with uneven cash flows.
EX.
Yr CF
0 ($2,000)
1 160
2 200
3 350
4 395
5 432
6 440
7 442
8 444
View 8 Replies
View Related
Feb 3, 2009
I'm going nuts trying to figure out what formula I could use to give me totals in columns Q and R of the attached file. Basically, in the Weekly Totals column, I want to populate how many Customers and Bags were handled according to each ship name (the data is in the table to the left). Any suggestions would be GREATLY appreciated, I'm taking stabs in the dark but am not coming up with anything that works.
View 6 Replies
View Related
Jan 20, 2014
I want to write a macro that would delete the rows if the sum equal to zero and the description is identical. For example:
Column a: Column b:
100 Apple
200. Apple
300. Grape
-100. Apple
-200. Apple
400. Cherry
-400. Cherry
The answer should be 300 grape.
View 2 Replies
View Related
Sep 14, 2009
I was trying to sum/average last values in a range. If the range is updated, it should sum/average the last 5.
Tried to do it myself but succeded to do my head in only.
View 9 Replies
View Related
Feb 2, 2009
I need to sum all the rows, except the header row, of a column inputted by the user. The column will be located in a worksheet dubbed SourceSheet.
Here's a few pieces of code related to what I am trying to do. The header row is always row 1. So the rows I'm summing are always 2 - myrows.
View 6 Replies
View Related
Aug 6, 2012
I have a sheet whereby in column A i have company names and column B how much is invested in this company so:
A B
AAPL 10
GOOG 5
MSFT 15
APPL 5
IBM 20
GOOG 10
What i would like to do via macro is take all the duplicates sum them so that i see AAPL as 15 but only be left with one row. So we would be left with only 4 rows each with their summed weight.
View 9 Replies
View Related
Jul 1, 2013
Basically, we have 2 tablets tallying data and writing to the same .csv file. That csv file is then copied into a front page of a much larger excel worksheet where the tallied data is sorted and used for a variety of reasons. This works perfectly using index and match when only 1 tablet is being used, however, when both tablets are writing to the same csv at the same time it creates 2 lines instead of 1 line.
For example 1 tablet might look like this:
Lot 45689 4 6 8 9 1 5
2 tablets looks like this:
Lot 45689 2 3 1 8 1 4
Lot 45689 2 3 7 1 0 1
for the tallies, i would imagine a =SUMIF function might suffice, but that doesn't solve my problem of there being 2 lines with the same lot #.
I am only dealing with this issue from the excel side, and have no control over the tablet functionality or the CSV file which further limits me.
Wanted to add that the Lot #s change daily and often so with my understanding of pivot tables this rules them out as a viable option.
View 10 Replies
View Related
Mar 22, 2012
My data in excel looks like this:
A B C D
Visit_Date Day_of_the_VisitHousing_Tour_TimeNumber_in_Party
3/22/2012 0:00Thursday 12:00 P.M. 2
3/22/2012 0:00Thursday 12:00 P.M. 4
3/22/2012 0:00Thursday 12:00 P.M. 1
3/22/2012 0:00Thursday Not Requested 2
3/22/2012 0:00Thursday 12:00 P.M. 3
3/22/2012 0:00Thursday 12:00 P.M. 3
3/22/2012 0:00Thursday 12:00 P.M. 4
3/22/2012 0:00Thursday Not Requested 1
3/22/2012 0:00Thursday 12:00 P.M. 2
3/23/2012 0:00Friday Not Requested 2
3/23/2012 0:00Friday Not Requested 5
What I'd like to be able to do is if Column A,B, and C are the same to sum column D. So, for example, I would like the data above to look like this:
A B C D
Visit_Date Day_of_the_VisitHousing_Tour_TimeNumber_in_Party
3/22/2012 0:00Thursday 12:00 P.M. 7
3/22/2012 0:00Thursday Not Requested 3
3/22/2012 0:00Thursday 12:00 P.M. 12
3/23/2012 0:00Friday Not Requested 7
View 2 Replies
View Related
May 18, 2007
how to code VB to where when data is sorted a formula can be placed at the bottom a column to sum or average the above data?
I have tried relational positioning e.g
each time a row is created, integer n5 = n5 + 1
Application.CutCopyMode = False
ActiveCell.Offset(rowoffset:=1, columnOffset:=12).Select
ActiveCell.FormulaR1C1 = "=sum(r[" - " & n5]c:r[-1]c)"
ActiveCell.Offset(rowoffset:=0, columnOffset:=7).Select
ActiveCell.FormulaR1C1 = "=average(r[" - " & n5]c:r[-1]c)"
Application.CutCopyMode = False
n2 = ActiveCell.Offset(rowoffset:=1, columnOffset:=-19).Address
n5 = 0
Where n5 is augmented each time a row is created then set to 0 to count the next list
View 9 Replies
View Related
May 9, 2008
I have Master sheet where I collect info from sub sheets. All sheets are similarly formatted, ie. product numbers on column A and headers on row 2. I need to sum values from all sheets based product number and header. Master sheet includes all product numbers and some extra headers, sub sheets include only needed numbers. Headers on sub sheets are identical.
Currently I have this thing solved with following formula:
N48=sumproduct(sumif(indirect("'"&$B$378:$B$385&"'!A:A");A48;indirect("'"&$B$378:$B$385&"'!L:L")))
Where B378:B385 includes sheet names.
But problem with this is that column is hard coded, so I have to know that that value I am looking for is in column L. That wouldn't be show stopping problem on its own, but I have columns all the way to DR and copying formulas for each column takes a lot of time when I have to manually update each column. Just copying cell holds that L:L and doesn't change it.
So, in addition of getting values for specific product number I need to get values from specific column based on column header.
View 9 Replies
View Related
Feb 24, 2009
Finding the Column with the MAX Height in comparison with other Columns of UNEVEN Height
I need two things :
1. I have several columns starting from Column B till Column F, each column having values starting from the third ROW.
Ex:-
Lets say Column B contains two values in B3 and B4, Col C three values in C3 C4 and C5, Col D four values D3,D4,D5 and D6, Col E two values in E3 and E4, Column F five values F3,F4,F5,F6 and F7.
So, the answer is F3:F7.
2.I am using 10^{4,3,2,1,0} in a particular portion of a formula, Now the number of elements in the array or in the Curly Braces depends on the number of Columns filled from Column B as explained in the Point 1.
Now, since I have five columns under consideration I have this order as mentioned here {4,3,2,1,0} , I would like to know whether I could make this dynamic, as in if there were only four columns then this would be {3,2,1,0} and if more this array could self-fill and expand..
If that's possible, then how do we use it in the formula, Is it by the virtue of the INDIRECT function?
View 14 Replies
View Related
Oct 9, 2008
In a worksheet I have (not equal) blocks of data. In column A there is the projectnumber, in columns B-K there are data. Projects are devided by an empty row. All rows in some block have in column A the same value (projectnumber).
What I need is the following: I would like to add names to that blocks. The name must be equal to the projectnumber.
View 7 Replies
View Related
May 19, 2014
I have a list of numbers in Col.A which can be variable in length.The objective is to copy these numbers into Columns with 3 col gaps in between.So the objective is that these numbers are listed horizontally (with 3 col.gaps separating each nr).To achieve this I have written the script below. However, as the orig.list of p/ns in Col.A can be variable, I would like to perform the transposing in blocks of 10 numbers.The transposed end product should be listed 10 numbers in each row (with 3 col gap between)rather than in one row. how to modify my vba script to do the above?
Code:
Sub TransposeSkippingColumns()
Dim c As Range
Dim i As Long
[Code]....
View 8 Replies
View Related
Nov 2, 2009
I have 250000 lines of data and at the moment they are in seperate blocks of different sizes, and seperated by 5 blank lines.
For Example
112
1523
523
1523
*5 BLANK LINES*
12
23
*5 BLANK LINES*
344
4563
etc.
What I would like to do is give each block a number.
1 112
1 1523
1 523
1 1523
*5 BLANK LINES*
2 12
2 23
*5 BLANK LINES*
3 344
3 4563
The lines in between will come out eventually I just need them there as they are difineing the blocks of data.
View 3 Replies
View Related
Apr 19, 2012
I want to stack columns in blocks. Have not been able to work out a VBA code for the same. Let me explain the need:
- There are N columns of data, for e.g., Col. A, B, C and D has Data (total of 10 rows) ... 4X10 layout
- I want to stack columns in blocks as follows:
AB
AC
AD
... 2X30 layout
View 7 Replies
View Related