Creating Variables Based On Cell Location

Oct 10, 2009

if Row i Column j is activated then a corresponding variable Aij, Bij, Cij or Dij would be created (if not already existing), or cumulated by 1. The problem as I see it - completely generalised - is to create a variable where the variable name itself is formulaic, as well as its value. I know SAS would have no problem with this due to the order in which it parses data steps, but I'm pretty amateur with other programming languages so I don't know if this is blindingly obvious or downright impossible!

View 3 Replies


ADVERTISEMENT

Cell Value Based On Mouse Location

Jun 25, 2007

Is there a way to have excel track where my mouse is hovering(say if I have it hovering over cell A4) and have it return the value of A4 in a different cell (e.g B7)?

This would occur in real time - that is, as my mouse moved over the spreadsheet, B7 would update in real time.

Note I would also accept someone selecting the cell - hovering (no select) would be ideal but selecting is OK.

View 6 Replies View Related

Finding A Cell In A Variable Location Based On The Contents Of The Cell

May 2, 2012

I am creating a macro to automate data analysis for work, but I've become stuck.

I need to find the coordinate of the first cell in a column with word "reserved" or "extended" contained in the cell, and then assign the row number of that coordinate as a variable to use for moving data around. Basically, I want something like VLOOKUP, but instead of returning a value, I want it to return the coordinate.

View 1 Replies View Related

Select A Range Based On Active Cell Location?

Oct 27, 2009

I'm trying to select a range of cells whereby the range is dependent on the currently active cell. I know you can use the "Activesheet.Range("A1:D2").select" method to select a range where the cells are always the same, but I'm after a dynamic selection where the values can be programmatically altered depending on some other result.

For example, let's say that I make a certain cell active (based on the result of some other formula), and I want to select the range of cells in the adjacent column that is X rows deep. Putting this into context, imagine the resultant active cell is B2, I then want to select the range C2:C10, but if the active cell is E10, the range selected would be F10:F18 (if active cell is X, then range would be Y:Z).

The Offset function would allow me to position the cell based on the current active one, but it doesn't let me select a range. The Range function only lets you choose either hard coded or index cells, e.g. "Range(cells(y,z), cells(y,z)).select", but this is still no good because I'd need to know the index value of the active cell (can this be done?).

View 4 Replies View Related

Copy Cell To New Location Based On Criteria In Another Cell?

Jun 25, 2014

I've sent out a survey asking people to sign up for one of two groups, A or B. I have a table with a long string of responses, with the name in column A, and in columns B or C there is an X that shows whether they have chosen Group A (column B) or Group B (column C)

I am trying to write a bit of code where it would paste the names into a new table with the headers Group A and Group B. Here is what I have pieced together so far:

Sub Create_Groups()
For i = 2 To Range("B2").End(xlDown).Column()
If Range("B" & i).Value = x Then

[Code].....

View 5 Replies View Related

Creating A Reference To A Workbook With A Fixed Location But With A Changeable File Name

Jun 12, 2008

I'm trying take a reference from some workbooks (e.g. WB1.xls,WB2.xls,WB3.xls,...etc)
They are all placed in one folder but there filename is subject to change,

I need to get the result of Cells A1 from WB1.xls+A1 from WB2.xls + A1 from WB3...etc
to shown on AA1 in another workbook(e.g. Collected.XLS)

Is this possible knowing that workbooks filenames are changeable?
Moreover Can the value of A1 from any new workbook added to the same folder be added automatically?...

Can the formula typed in AA1 from Collected.xls be draged down?(So as to show the sum of Cells B1 and C1.....etc) from each workbook?

View 9 Replies View Related

Excel 2013 :: Macro - Paste To Column Cell Location Based On Variable?

Jun 16, 2014

I have data in E6-E67 on Sheet 1. Based on the date in A2 on that sheet, I need to paste to a column in Sheet 2. In excel, I am able to get the cell location through vlookup and get the correct column number/cell reference. When it gets to the paste location, I am stumped on how to format that line of code? Do I need sometime of variable? I tried to use the address/lookup code but it does not work.

I have excel 2013.

View 4 Replies View Related

Looking At Creating A Combine Chart For 3 Variables?

Mar 25, 2014

i am looking at creating a combine chart for 3 variables.how to achieve that?

TeamSubTeamsScore
A X 20
Y 25
B X 10
Y 20
C X 15
Y 10

View 3 Replies View Related

Asigning Variables Based On Cell Content

Sep 30, 2007

I just ordered vba for dummies, in the meantime I will have to get my info from the experts on this board. I want to use a name I have in a cell in a msgbox routine.

Currently I have

View 10 Replies View Related

Create Active Cell Formula Based Of Variables From Given Cells?

Apr 20, 2012

I am trying to create an active cell formula based of variables from given cells.

With ActiveCell.FormulaR1C1 = "=CONCATENATE(""RU"",RC[-12],RC[-11],RC[-10],RC[-9])-CONCATENATE(""MU"",RC[-12],RC[-11],RC[-10],RC[-9])"
ActiveCell.Formula = ActiveCell.Value

But This does nothing.

View 5 Replies View Related

Reference Cell Based On Button Location & Determine Button Used

Mar 7, 2008

I received this code from an example I found once upon a time that was originally submitted by someone else. Right now the code enters the current date in a cell of the same row as the checkbox when it's checked. I need to revise it, or come up with something similar, that will reference the value of a cell when it is in the same row as the button (from the Forms toolbar) that is clicked to activate the macro. First of all, I don't know how to reference a Forms button in VBA.

Sub Process_CheckBox()
Dim cBox As CheckBox
Dim LRow As Integer
Dim LRange As String
LName = Application.Caller
Set cBox = ActiveSheet.CheckBoxes(LName)
' Find row that checkbox resides in
LRow = cBox.TopLeftCell.Row
LRange = "B" & CStr(LRow)
'Change date in column B, if checkbox is checked
If cBox.Value > 0 Then
ActiveSheet.Range(LRange).Value = Date
'Clear date in column B, if checkbox is unchecked
Else
ActiveSheet.Range(LRange).Value = Null
End If
End Sub

Here is some other code I already created. Unfortunately, because I don't know how to do the row reference, I had to create 25 different macros, which just bulks up the size of my file and slows it down. But here is what I'm trying to accomplish in my macro:.............

View 8 Replies View Related

Auto Creating A Calendar Based On A Date In A Cell.

Dec 30, 2009

I am playing around with creating a calendar based on a date (month) I enter into a cell. I am doing this with a simple =date+1.

I have a sample attached. Only problem I am having is that for months with 30 days I don't want the last day to show the first of the next month. But I can't simply remove that as if I entered a month with 31 days I would need it to show the 31st.

View 4 Replies View Related

Creating A Formula Based On Dimensions In A Single Cell

Dec 10, 2009

In my business I deal with a ton of different dimensions for my products. A lot of times the dimension will be within the cell as follows, "Product A 17x27 Brown", is in a single cell.

Is it even possible to write a code or formula that will find the "17x27" in the description, recognize it as a "dimension" and then run the formula that I need which is

View 18 Replies View Related

Creating Compact Text List After Comparing List Against Two Variables

May 8, 2014

I would like to be able to compare the "standards" in Column A with the Assessment status in Column B and the Assessment period in Column C in order to generate a compact list in another workbook (ideally) or tab (if not). A list might typically contain all the standards that have been M (mastered) during a given Assessment period. I realize that filters would achieve this to a large extent but I was hoping to automatically populate another worksheet or tab.

View 3 Replies View Related

Sum Rows Based On Location

Mar 2, 2007

See the attached sheet. i need a formula that finds the word "Find Me" and performs the calculation written to the side of the word "find me", and stops with the word "finished". the difference in rows between "find me" and "finished" varies. i am at a loss on this one.

View 6 Replies View Related

Declaring Columns Based On Location Of Value

Jun 14, 2012

Right now in cell AE1 the value = "SUM", but the word "SUM" floats in row 1

I'd like a macro that looks through row1, and gives me the column letter that the word "SUM" resides in

sCol_1 As String

sCol1 = (Where ever the word "SUM" is located in row 1)

not sure if this is the best way.

View 2 Replies View Related

Interpolation Given A Variable Table Location & Location Of Data Within

Oct 6, 2009

I am trying to develop a spreadsheet that will calculate a cost based on a matrix. I am attaching a sample of the calculation created so far. The end result is in cell M13 and is highlighted in yellow. I kind of layed the formula out in a few different cells, so hopefully it would be easy to follow.

simplify this process with maybe another formula that I might not be aware of, or maybe show me how to get this done in VB code. I think VB code would be the correct way to go just not sure.

View 6 Replies View Related

Returning Values Based On Location In Column?

Feb 19, 2013

I'm trying to find a way to test is the max value in a range, columns A-F, comes after the min.

Example: Columns A-F have the values 4,1,3,5,2 respectively. I'd like a test to see if the min, in this case Column B, comes before the max, column D, and have an output that says yes or no. So in this example yes but if the numbers were instead 4,5,1,2,3 it would return a no.

View 3 Replies View Related

Show/Hide Command Button Based On Location

Jun 28, 2008

What i am trying to do is make a command button appear when you hit any cell of the row its on. For example, If you were to hit any cell on rows 1 or 2 the command button will appear and when I am not on the visible property goes back to false. I have a ton of buttons on this sheet and I am trying to clean it up so buttons only appear as needed.

View 9 Replies View Related

Change File Path Name In VBA Code Based On Files Location

Mar 11, 2014

I have the following code written but I'm wondering if it's possible to modify this to change the red line to update to the path that the workbook is saved in? Meaning that User1Folder1 would change but [Workbook1.xlsm]Sheet1'E1 would always be the same.

[Code] .......

View 2 Replies View Related

Return Value Based On Two Variables?

Apr 19, 2014

how to return a value based on two variables. I was trying with hlookup and offset but excel kept ignoring my thoughts.

Here is a sample of how the data looks like and what I want to do:

excel.jpg

Depending on the ID which is entered in G2, cell H9 has to get the value from D4.

I know that ID is gonna have to be extracted with find function from column A. So every time an ID is entered (in cell G2) it would need to look for it in column A and then return the value VACLEG from column D.

View 5 Replies View Related

Sum Of A Range Based On Two Variables

Jun 18, 2009

I'm trying to create a simple checkbook application for a friend. I've gotten pretty much everything I want figured out except for two functions, which are basically the same thing. I'm trying to find the sum of all deposits and of all withdrawals based on two entered dates.

Basically, they enter the dates, and the formula finds the dates, then sums all the deposits/withdrawals between them. I attached the workbook with some sample data in case I wasn't really clear.

View 2 Replies View Related

Sum 1 Column, Based On 2 Variables

Dec 9, 2009

A B C D
COL 0
COL 0 1
COL 0
COL 0 1
COL 0
EDM 0

I need to add the number of 0's in column B if Column A is COL and C OR D is 1. correct function yields 3 for this example. I've played with =sumproduct(if)) and =sumproduct(if(and))) etc... can't figure it out.

View 9 Replies View Related

Sum Column Based On Two Variables

Jun 28, 2007

I have data in three columns. The first column contains the machine name (Robot 3, Robot 4, and Robot 5), the second column contains the paint color (1-20), and the third column contains the data that I need to sum. For example the data could be paint purges, the number of purges from each robot. Each row of data will contain a number of purges for each robot, for each color. The data is provided by day, so I will be summing the data weekly.

View 8 Replies View Related

Maximum Value Based On Multiple Variables

Jul 28, 2009

Maximum value based on multiple variables. Basically what I have is something like this:

View 3 Replies View Related

Eliminate Duplicates Based On Different Variables?

Nov 28, 2012

I have a list of serial numbers. There are many groups of 8 same serial numbers, where group consists of 2 projects with 4 SN per project (because of 4 different events). I want to create a formula that marks one project with 4 out of 8 SN for deletion based on set of 3 dates assigned to them. In short I need to count 4 rows per project as one unit.

Serial
Project
Event description
Date1
Date2
Date3

Here is a list on what information matters when making decision if to mark project for deletion or not.

1. Project1 has no Dates entered compared to Project2. Mark Pr1

2. Project1 and Project2 has no Dates entered. Mark Pr1 (random, does not matter which should be removed)

3. Project1 has 2009 Dates, Project2 has 2011 Dates. Mark Pr1 because dates are older

4. Project1 has less Date entries filled than Project2 (same year). Mark Pr1 because less Date fields entered.

I can somewhat do it for separate rows, how I can make these rules apply for whole project as one unit related only to one SN at a time. Biggest problem is there is no pattern of dates entered. Sometimes one row can be filled another missing out info and etc.

View 1 Replies View Related

Autofill Range Using VBA Based On 2 Variables

Jan 14, 2014

I am trying to write some code that keeps throwing me the error message "Autofill method of range class failed". But I cant understand why, I think it may have something to with my range notation:

Code:
Sub SummariseSheets()
'collates individual client development data from consultant
'worksheets and compiles in one sheet on summary page

[Code]....

The error is in the "Selection.AutoFill Destination:=("C" & LR & ":C" & LR2), Type:=xlFillDefault" line, however I cant figure out why? The code essentially takes a section of data from multiple worksheets, then pastes it onto the summary page. It then adds the name of the sheet the data has come from into column C next to the relevant rows.

View 2 Replies View Related

Sumif Based On Multiple Variables

Jun 21, 2006

I am trying to do a sumif based on two different columns. For example In col A I have part #s, in col B i have quantity, and in col C, I have the different representatives. I want to import the qty sold onto another worksheet. In the cell for the total number I want to know, how many of part# 401 were sold by rep A.

Here is the sheet that the information will be drawn from:

Part#QTYREP
4011A
4023A
4031B
401 1 A

Here is the sheet that the information will be output:

Rep
Part#AB
4012
4023
4031

View 5 Replies View Related

Calculating Number Based On Multiple Variables?

Jan 24, 2014

What I am trying to do is calculate a particular charge based on two main variables the city and weight chosen (each of which will correspond to a particular value) .I have these cities and weights which correspond to a particular price per 100kg when two are selected

My excel data is set up like this

(A).....................(b)......................(c)..................(d)........................(e).........................(F)
.......................Weight..................0-999Kg.............1000-1999kg..........2000-4999kg..........5000-9999kg
1. City
2. Toronto....................................$5.50..................$4.00..................$3.75..................$3.50

3. Winnipeg....................................$3.20..................$3.75..................$3.6..................$3.21

4. Saskatoon..................................$5.4..................$5.2..................$4.90....................$4.70

(I added a,b,c,d and 1,2,3,4 for reference when explaining the formula)

I have a separate row where I am able to enter a weight in one column (A24) and and choose the city from a list in the second column (B24). I need the next column (C24) to display the dollar charge per 100kg from my data that corresponds to the city I have chosen and the weight entered. I am trying to figure out a formula for C24 that allows for instance $5.50 to be displayed when I type in 800kg for A24 and choose Toronto from a drop down list in B24. This row will look like this for reference:

..................A............................ B..............................C.
..................Weight..................City..................Charge per 100kg
24...............800..................Toronto..................$5.50

View 5 Replies View Related

Managing Categories Based On 2 Variables And A Chart.

Aug 18, 2009

I have a list of about 700 guys with their names, ages and a coolness factor between 1 and 10. I have different categories that I want them to fit into based on their age and "coolness". The charts at the top of the sheet I've uploaded. Ages are on the top and their coolness rating is on the side. So for instance if somebody is 27 and has a coolness of 6 they would be lumped in the World category. How do I create an IF command that would automatically list what category they're in based on age and coolness?

View 6 Replies View Related







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