Sum A Range Based On A Starting Lookup Value

Mar 2, 2009

I'm trying to sum a range of data consisting of 12 cells (each range is in a unique row going across adjacent columns). The range of data to be summed is based on a lookup value which is a column header - I want the range to start with this lookup value. In column B of my spreadsheet, I have a 'First Activity number code' going down...In Row 4, I have the same First Activity Codes going across the row (the column headers). In Column U, going down the column I am looking for my formula.

So For example, in row 5 of my spreadsheet, I am looking at 73 as my base code (the value in column B), and I want a range of data summed that lies in the same row where the column headers are 73 - 84 (12 rows) - always starting summing the range with the same number that is in column B. So in row 18, 78 is my base number; so I would want the sum of the numbers in the same row where the column headers are 78-89 ( 12 columns).

View 4 Replies


ADVERTISEMENT

Create Range Based On Starting Cell Plus A Number Sent To Formula

Mar 13, 2014

I'm using the VBA code below for a piece of code.

[Code] .....

However, I want to use this same function in another place, without the limit set on the cells that will be cleared.

What I would like to do is send the formula the cell to start at (E14), offset that by one column, and then send a number of rows. With that, create the range to be cleared.

Something like:

[Code] .....

View 3 Replies View Related

Return A Lookup Value Based On A Range Of Options?

Jul 13, 2013

I have used the below formula which works in a standard cell, however I would like to have this is a VBA code using the Target.Offset option, however I can not get this to work. There may also be a better way of doing this.

The code is looking to see if the 1st cell (A118) is empty or not, if it is empty do nothing otherwise it then looks up the value in the 2nd cell (B118) and assigs the appropriate name from the range values.

VB:
=If(A118="","",LOOKUP(B118,{0,0;0,"";1,"Main Bank";71,"PFS";80,"Main Bank";106,"Dry Clean / Photo";112,"SCO";141,"Cafe";168,""}))

View 5 Replies View Related

Lookup Array/Range Based On Cell Value

Jan 4, 2009

I need the array portion of a lookup formula to change based on a cell value.

On a worksheet(named "groupings")that groups students according to ability level, I have data validation lists where teachers select the criteria for the group. In cell I5 they choose the period, and in cell L5 they select which assessment to look at.

Cell B8 will either say high low or medium. Then in cell C8 I have this formula: Lookup_Occurence($B$8, ??????, 1,1,2)

Again the array will depend on what is entered in cell I5 and cell L5.

I have attached one of the worksheets the lookup_occurence will be referencing. In this exit card worksheet if cell B10 (the name of the assessment) matches what the teacher chose in cell L5 on the groupings worksheet, then the array formula will be 'Exit Card'!Card1. If cell G10 matches what the teacher chose in cell L5, then the array would be 'Exit Card'!Card2. Where A9:C339 is named Card1 and cell F9:H339 is card2 etc.....

However, it gets even more complicated then that because within Card1 there are 8 periods, and if a teacher chose period 1 in cell I8 on the groupings sheet, then I only need the array to look at the period one data in the card1 array.

Essentially what I am trying to accomplish is create a page where teachers can group students by ability level according to any assessment they choose. On the exit card page the formulas currently equaling # Div/0 will say either high, med, or low depending on how a student performs on that assessment.

View 9 Replies View Related

Lookup Based On Numeric Range Scope

Nov 19, 2009

I have a spreadsheet and I’m trying to create several different staffing scenarios
Basically what I want is to populate column E with the amount of staffing based on the number of classes in column B. The range that I want to apply is in the green box in the sample. I’m trying to have excel give me the staffing value if the current number in cell B5 is a certain value – so in the example 1 through 4 = .2, 5 through 8 = .4 and 9 through 12 = .6. this site gave me some ideas so I tried V lookup and Index but I seem to be missing something and wonder if it is not combinations of nested functions?

View 3 Replies View Related

LOOKUP Range Based On Contents Of A Cell

Aug 24, 2006

I want to be able to send out one “master” workbook with the fourteen ranges, and use a pull-down list (or anything else) so when the user selects a state, the proper lookup range will be used. In the attached abbreviated example, I want the lookups in Column B to refer to the state designated in B2. In this case, the VLOOKUP works correctly, since Colorado zip codes are in the ColZip range.

The people in Idaho or Oregon using this will only be working with their respective zip codes in ranges IdaZip or OreZip, so if they enter their state in B2, I would like the VLOOKUP to look in a different range. My whole idea is to only have one master workbook so I don’t have to create one for each district office. Maybe I’m thinking in a wrong direction altogether.

View 3 Replies View Related

Delete Row Based On Starting Character 1st Then Contains

Jun 23, 2007

I would like to create a macro that deletes all rows starting with an open parenthensis in column B. The contents of what is in parenthis varies from 2 letters up - so anything starting with a parenthis is sufficient criteria.

After the initial deleting (mentioned above), would also like to delete (from column B again), rows containing specific, multiple phrases.

None of the functions I have see so far will facilitate this...

View 9 Replies View Related

Dynamic Range When Starting Cell Not Known

Jul 4, 2007

I found dynamic range name across columns:

=OFFSET($A$1,0,0, COUNTA($A:$A),COUNTA($1:$1))

which expands across Columns in Row 1.

What if we don’t know range to be named in which row or column starts?

What will be a formula (assume range starts on cell named “BegRng”)?

View 3 Replies View Related

Copy Range Starting From Last Used Cell In Column

Nov 10, 2009

I have a macro that is copying information from one spreadsheet into columns "A through E" on the next available row in a seperate spreadsheet. Beginning with column "G through L" I need to copy the formulas from the row above in the same spreadsheet. Is there a way to do that since the row being copied from will change each time?

View 4 Replies View Related

Selecting Entire Date Range To Be Lookup Based On Start And End Dates

Mar 6, 2013

I have an excel sheet where I would like a user to enter a start date and end date(say Feb 1, 2013 to Feb 28,2013). And these dates will be able to change to whatever month the user wishes to look up in a specific date range(column A has 365+ dates). This post is closely related to [URL]... but I cannot figure out how to get it to work from my case.

So working off the same worksheet, I have the beginning date in AC35 and the end date in AC36 in which the user enters. I would like the dates that fall in this entire month, including the beginning and ending dates to be referenced when looking for the specific day that contains a value I have in S35.

In other words, I have data in columns A through N. The dates are in column A and S35 is a value obtained from using Max(L185:L526) where L185:L185 is manually selected each time I want a different month. I don't want this to be a manual process of scrolling down the spreadsheet to get the next month.

View 12 Replies View Related

Lookup Nth Occurence In Range & Limit Rows To Search Based On Cell Value

Jan 14, 2009

I have a UDF for a lookup_occurrence formula (thanks to Dave), and I was wondering if it was possible to tweak the range it looks at with if statements.

I have a formula like this =Lookup_Occurence(B13, INDIRECT($N$5), 1,1,5) where N5 says exit card 1.

I need it to only look at a certain rows within exit card 1 depending on the value entered in I5.

If value I5 says Period_1 it will only look in rows 12:46.

If value I5 says Period_2 it will only look in rows 48:82 etc.

I believe I need to modify the xl look part of the code with if statements.

Below is the code. I am wondering if I can replace the xlLook line with nested if statements. If I5="Period_1 then rows 12:46" etc.

Function Lookup_Occurence(To_find, Table_array As Range, _
Look_in_col As Long, Offset_col, Occurrence As Long, _
Optional Case_sensitive As Boolean, Optional Part_cell_match As Boolean)

Dim lLoop As Long
Dim rFound As Range
Dim xlLook As XlLookAt
Dim lOcCheck As Long

View 5 Replies View Related

Remove Cell Content Based Upon Not Starting With A Word

Jun 16, 2008

I am working on a macro and, as part of it, I would like to look at column A of my spreadsheet and remove all cell contents where the text in the cell does not start with the word "total." For instance, if the text of a cell in column H is "total money" I would like it to remain unchanged. However, if the text of a cell is "George Baker" I would like it removed. I ONLY want the text in column H to be considered ... no other column.

View 3 Replies View Related

VBA To Average Range Starting From Minimum Value & Ending At Maximum Value

Jul 4, 2009

I am using Excel to use stock ticker symbols such as FDX "Fedex", to return past volume and price daily performance found in Google Finance that will be manipulated with the current VBA I am working on that will result in a trading pattern. Each trading pattern will happen at a different range in the same column. I will be inputting hundreds of ticker symbols daily so using VBA and not having to enter formulas manually in each is greatly preferred as this will save me lots of time.

I am stuck trying to find the average value of a range starting from the minimum to the maximum value. For instance, Range("H10:H20") may have a maximum value at range("H12") and a minimum at Range("H18"). I would like the average of Range("H12:H18").

Sub Fnd()

Dim MaxStartPriceRange As Range
Dim MinStartPriceRange As Range

Dim MaxPriLocation As Double

Set MaxStartPriceRange = Range("h11:h21")
MaxPriLocation = Application.Max(MaxStartPriceRange)

Set MaxStartPriceRange = MaxStartPriceRange.Find(MaxPriLocation)

Dim MnPriLocation As Double

View 4 Replies View Related

Select Cell Range Relative To Starting Position

Mar 5, 2007

I need to change multiple conditional formats which apply to cell ranges 1 row x 17 columns wide. The specific change I am making is able to be acrried out with the code

With Selection.FormatConditions(1).Font
.ColorIndex = xlAutomatic
End With

However, I dont want the user to have to manually select each 17 cell area. I WANT THE USER TO JUST MANUALLY SELECT THE FIRST OF THE 17 CELL AREA. I want to write a macro that will THEN select a row of cells, 17 cells long, from the MANUALLY SELECTED position as at the moment of running the macro. Unfortunately the cells are not always on the same row in each sheet. On one sheet they may be on row 5, on another row 8 and on another, row 15 etc. I was wanting to be able to select a 17 cell range 'relative' to where the cursor is. How do I write the code to select the relative cell range? Is there an answer in an R[1]C[1]:R[1]C[17] sort of code?

View 7 Replies View Related

VBA To SHADE Cells Based On: Step-size & Starting Cell

Mar 4, 2009

I have a spreadsheet that will monitor payment schedules, in which both payment frequency and the payment start date are inputted by the user.

As such, to make filling out the column(s) fool-proof, I want to grey out cells in which data should not be entered.

For example, if the payment frequency is every 6th day, and the payments are to begin on day 0, then days 0, 6, 12 (etc) should be left white, whereas the remainder of the cells should be shaded.

I can achieve this using multiple conditional formatting rules in excel2007 with iterations of formulae of the type:

View 14 Replies View Related

Selecting A Range From Starting/ending Cell Rows And Columns

Feb 19, 2010

I need to accomplish selecting a range using variables for the starting cell and ending cell rows and columns.

Pseudo code (how I'd like the syntax to be, but isn't):

Worksheets(mysheet).range(startCellRow, startCellCol : endCellRow,endCellCol).Select
With Selection
...
End With

View 6 Replies View Related

Select And Copy Set Of Data In Column Based On Starting And Ending Values

Aug 26, 2013

I have a macro that copies three sections of data from a word document and pastes it within the Excel worksheet. The column of data is pasted in a single column (data to be space-delimited and evaluated later), and what I would like the MACRO to do is separate the three sections of data based on the starting and ending values of the section and place them in different columns.

Section 1 : starts with the word "Team"
Section 1 : ends with the word "City"

Section 2 : starts with the word "Location"
Section 2 : ends with the word " Date"

Section 3 : starts with the word "Member"
Section 3: ends with the word "Age"

So section 1 would be pasted into cell C1, section 2 pasted into G1 and section 3 pasted into J1.

Each section will have vary in number of rows between the starting/ending values, so to cut and paste the section based on the starting and ending value is vital.

View 7 Replies View Related

Excel 2007 :: VBA Code To Delete Rows Based On Text Starting Content

Oct 25, 2013

Using excel 2007. I am interested in writing a VBA code to delete rows based on the text starting content. I would like to delete rows with cells that do NOT start with an "S" or "SA"

EX:

05S0128
06S0112
05S2298
S25852
S36963
SA36185

I would only like to keep the last 3 lines.

View 3 Replies View Related

Forumla To Give A Starting Number And Take One Away Each Time A Code Or Codes Are Dislayed In A Cell Range

Mar 22, 2009

In 1 cell i need a forumla to give me a starting number and take one away each time a code or codes are dislayed in a cell range. Something like this

A1 = 23 days or any number days i needed

Cell range B1:C52

every time a selected 1 or 2 letter code appears in the cell range i want A1 to subtract 1 day from the starting number, i would need it to subtract half a day if one code appears ie HD, the codes may be P, OT, HD

View 4 Replies View Related

Lookup Range Of Cells And Populate Specific Cells Based On Matching Data?

May 23, 2014

I am trying to build a staff roster. The staff rotate over a 4 week cycle. the name of the staff member, and their shift needs to be looked up from the key then matched with the particular week. the name and shift then need to populate specific cells.

I have attached the worksheet so you can see what i am trying to achieve.

View 2 Replies View Related

Search Column For Cell Starting With X Then Copy Row To A New Tab Based On A Cell Value

Jan 13, 2014

I have an tab with 20,666 rows that I need to separate into different tabs based on what a cell in a specific row starts with.

Data Tab
001-020-002-000 Walker River Irrigation DistPO Box 820 YeringtonNV89447
001-020-005-000 Walker River Irrigation DistPO Box 820 YeringtonNV89447
001-020-006-000 Walker River Irrigation DistPO Box 820 YeringtonNV89447
001-020-007-000 Walker River Irrigation DistPO Box 820 YeringtonNV89447
001-020-008-000 Walker River Irrigation DistPO Box 820 YeringtonNV89447

[|Code]...

So what I am looking to do is search the APN row in the Data Tab that starts with the number from the APN # row in the APN Tab and then copy the row to a new/existing tab named after the Description on the APN Tab.

I think that I have explained what I need to do

View 8 Replies View Related

Count Number Of Blank Cells In Range Starting And Ending Will Cells That Match String Values

May 13, 2013

I'm trying to develop a new daily timesheet for my production workers, where non-production items are recorded in 15 minute intervals. The user would put in "Clock in" by the corresponding time, and the same for "Clock out" at the end of the day. Any non-production items will be type in next to their appropriate time. Since clock in and clock out times will vary, I need to set up a formula that searches the array of cells for the day, finds the "Clock in" and "Clock out" values, and counts any blank cells in between them. Basically the blank cells will equal production time, and the result of the Count function will be multiplied by 0.25 to get the hours.

I am having a very difficult time finding a way to set the "Clock in" and "Clock out" cells as the range for the Count function, because it won't always be the same cells. What would be the best way to automatically have excel find the cells containing these values and set them as the range criteria for a Count function?

The formula at the bottom was one of my initial attempts, but it didn't work. I took out the '=' for the screenshot, so that wasn't the problem.

View 5 Replies View Related

Lookup 2 Values: Get The Lookup Answer Based On Two Values

May 18, 2007

im trying to get the lookup answer based on two values the current formula i have is

=VLOOKUP(AND(A1,B1),Sheet2!$A$1:$C$31,3,FALSE)

which naturally returns N/A... i might even be using the wrong formula?

View 2 Replies View Related

Lookup Value In Range?

Mar 23, 2014

I have one sheet "FF" which shows categories of companies (1-48) and each of these categories include several SIC numbers.

What I now want is to find the right category (1-48) for each SIC code in my second sheet.

View 6 Replies View Related

Lookup Name Range

Mar 6, 2007

is it posible to use lookup to complete a name range?
example:
if "joe" is a barbarian, sorcerer, druid, each class has features dependant on its class level, not the character level. so, if "joe" were a 9th level barbarian, 7th level sorcerer, 7th level druid, his character level would be 23.
each class is assigned its own name for its total levels. char_lvl_barbarian, char_lvl_sorcerer, char_lvl_druid.
is there a way to use lookup to match char_lvl_ to a given class type or do i need to type each individual class type level name range? i'm hoping for one formula that can allow me ease of use instead of a multitude of conditions.

View 3 Replies View Related

Lookup Value Based On Three Different Criteria

Jun 6, 2014

I have two workbooks. I'll call them wkbk1 and wkbk2.

I am looking at three cells in the same row in wkbk1.

I need to identify which row in wkbk2 contains those values and then return a value from a cell in the same row in wkbk2.

How do I structure this look up?

View 5 Replies View Related

Lookup Based On A Few Conditions

Mar 13, 2008

I am wondering if I can do a formula that would tell me if the name that appears in column J or K appears more than once at the time/date slotted in columns A and B. Basically, I want to make sure that the name(s) in column J and K aren't assigned 2 different places at the same time slot (column B) on the same say (column A).

View 9 Replies View Related

Lookup Based On Next Consecutive Value?

Jan 24, 2014

I have source data arranged in columns A and B, and in F5 and F6 respectively I'd like to create a formula to return the Null value from column B that's associated with AAA, BBB etc. An example of the results I expect are in F5 and F6.

View 3 Replies View Related

Lookup Based On A Date

Feb 20, 2009

I have a table with dates and currency-rates. There is only one currency rate per month, but the day can be different since the date is the last working day of the month. I want to lookup these rates based on a date where the day can be any day in the month. Any proposals?

Table example:

Date Rate
30.06.2003 7,09320
31.05.2003 6,70466

Lookup date: 20.05.2003

View 4 Replies View Related

Lookup Based On Two Conditions ...

Jul 13, 2009

I know that there are bunches of threads concerning lookups with multiple criteria, but I just can't figure out how to translate one to my situation. I want to return a value based on an item name which is in column A, and an operation which is in row 1.

The array from which I need to look up the value contains part number in column B, operation in column G, and the actual value I need returned in column H.

So I need to return something like this: ...

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved