Retrieving The Address Of The Last Cell Before The FIRST Blank In A Range
Sep 28, 2007
Retrieving the address of the last cell before the FIRST blank in a range.
OK, I have searched the web through six different search engines and explored too many dead end solutions to this problem that I am nearly ready to just scrap the whole sheet.
The problem is very simple.
I need to return the address of the last cell that contains data before the FIRST blank cell.
Heck, I don’t even need to have the address, I can just index the position.
Problem is this question has been posted on nearly every excel help forum from here to pokipsy.
Unfortunately EVERY solution I have seen fails the “FIRST blank” requirement.
I have a column of data that never has blanks until the end of the data. I need to know what that cell address is in order to identify a range.
This data has a table above it and below it so none of the “dynamic range” or “Dynamic range name” solutions will work.
How do you get that address without the function continuing to the last blank cell?
View 14 Replies
ADVERTISEMENT
May 12, 2009
Been looking all day in the answered threads for an answer and no luck, so I turn to again: I need to find an address of a cell matching a condition e.g. I have a results output in varying length but having fixed block structure. I want to find the block staring address as in a Match("test", "A:A", 0).Value command but apparently its an illegal command. I’ve been thinking of a Vlookup(test,”A:A”,0,false) structure but got no idea how to make it return the address instead of a value.
View 3 Replies
View Related
Mar 31, 2014
So I have 2 sheets from a much larger worksheet where I wish for the first sheet to extract a row of values, one at a time from the second sheet using a range of numbers I enter as reference for where to look for the data. Sheet 1 can be thought of as a summary page and Sheet 2 is where data is stored.
I need to first check if any data under Sheet 2 column B fall within a specified range of numbers and if any of those numbers are found I want it to grab the largest and latest number from that range and pull all the data from certain columns in that same row and place it into Sheet 1, one column value at a time.
Sheet 1 A1 = A range of numbers as text. 10-15, 16-20 etc Only one range is entered. This also tells me what results I'm looking at.
Sheet 1 B4:B14 = Destination cells for the individual data I'm wanting to pull from Sheet 2 columns H:P. B4 wants H, B5 wants I, B6 wants J etc
Sheet 2 column A = A3:A102 are numbered 1:100.
Sheet 2 column B = A series of numbers anywhere from 10-70. Always in sequence and they can repeat. 10,10,11,12,13,14,15,15,15,16 etc. Ranges from B3:B102. Only one number per cell.
Sheet 2 columns H:P = Data in H3:P102 I want to extract to Sheet 1 B4:B14.
Now lets say I want a formula for Sheet 1 B4 which wants a value in Sheet 2 H. If Sheet 1 A1 = 10-15, I want to check whether Sheet 2 column B has any values equaling those and then tell me which row that last number appeared in.
Example: Sheet 2 B4=14, Sheet 2 B5=14, Sheet 2 B6=16. Use B5. (B6 is outside range and B4 isn't the last time the 14 appears.)
Then, knowing B5 is the value I want, find which row it is in (row 5 in this example) or use the number in A5 (3) and then find my way to column H (H5) where the value I want to pull is.
Example 2: Sheet 2 B4=14, Sheet 2 B5=14, Sheet 2 B6=16. Use B5.
Sheet 2 H4=10, Sheet 2 H5=32, Sheet 2 H6=42. Place "32" from H5 into Sheet 1 B4.
I'd like to also have some error control so I'm not trying to pull data from blank cells if it's relevant. Maybe check if Sheet 2 X3=0 and if it is, do nothing as no data appears if the cell is 0.
I have put a lot of time into trying to solve this myself but I feel way out of my depth. I've tried going step by step but I can't seem to figure out which functions are relevant and also things like how to return the range that the A1 values appear in or if using MAX, not having it return values outside of A1's range also.
View 7 Replies
View Related
Feb 4, 2010
I am setting up a questionnaire which needs to be dynamic. The questions in the questionnaire are pulled from a 'baseline sheet' using check boxes and an if statement, i.e. each question in the baseline sheet has a tickbox next to it, and if it is checked then the question is populated into the questionnaire sheet.
Im wondering if there anyway for the worksheet to populate the input cell with the next cell value from the baseline sheet if the first is blank? So if a box is not ticked, it will intelligently seek out the next box that has been ticked and retrieve that value. Essentially, my goal is to not have any blank spaces in the questionnaire which is what is happening now.
View 4 Replies
View Related
Dec 3, 2013
I have a Choose function that is used to determine which range I need. e.g. =Choose(Choice,Cell,Cell,...).
In each corresponding "Choice" cell is a typed range. e.g. $B$33:$L$70
I'm looking for a way to be able to use this typed range as the range for some chart data.
View 2 Replies
View Related
Aug 25, 2006
I know that I can return the value of a defined name range, the address, and even the value of the define name, but if you are given a range address, how do you find its corresponding defined name in code?
View 4 Replies
View Related
Apr 29, 2013
I have to macros I'm working with the first take a user set range and prints the . Address to a cell.
The second Macro I'm trying to get to look at that cell and pull out the range. So is there an opposite fuction to .
Address that will convert excel format to a VBA Range format. Ex A cell with $A$1:$A$2 to Range("A1",A2")
Macro 1
Code:
For j = 1 To x
c = 1
For i = 1 To ws.Range("AD" & rc).Value
ws.Range("AE" & rc).Value = Application.InputBox
(Prompt:="What is the Heading of Data set #" & c & " Table " & tc & " This entry may repeat", Type:=8)
[Code] .........
Macro 2
Code:
'A lot of code here but I want to be able to set multiple ranges to the ranges list in the cell values.
rng(2) = sh(0).Range("AG2").Value
View 9 Replies
View Related
Jan 12, 2009
I have a variable which contains the column number. How do I then reference a range in VBA using that column number, as opposed to the letter? I know how to convert the number into the letter, but I also know there has to be something more simpler. For instance, a form of the ADDRESS function, but in VBA?
View 9 Replies
View Related
Nov 22, 2006
I want to define the range from a given cell and all data below within the same column strDataStart is the named cell in the worksheet that want to start from. Below is what I tried and failed.
Function rngDataCol(strDataStart As String) As Range
Dim rngDataEnd As Range
rngDataEnd = Range("strDataStart").End(xlDown)
rngDataCol = Range(Range("strDataStart").Address, rngDataEnd.Address)
End Function
View 5 Replies
View Related
Sep 22, 2007
I've set up a macro to create around 50 http links (sites which i need to monitor every week but whose addresses change slightly every month)
I've also got a macro to open up all these web pages at once so I can look at them in internet explorer.
When these links are nicely created into cells the http link isn't recognised straight away by excel (e.g. doesn't go blue & underlined) until i click in the cell & change or return the cell value - as part of the autocorrect function i think.
Is there a way of getting excel to automatically recognise the http links without having to go individually into every cell.
View 6 Replies
View Related
Mar 16, 2014
construct a formula that finds a value in a range , then returns the cell address of that value.
Say, i wanted to find the amount 12385 from another sheet , range C2:AA12 (contains only numbers , no duplicates). result should give me the address of that value.
I have tried the address & match function but gives me an N/A error.
View 3 Replies
View Related
Nov 12, 2013
I have a named range BGl (G1:R1). I would like to see if a cell address ($U$6) is within the columns of that range. I need a function to give me a true or false based on changing cell addresses.
View 5 Replies
View Related
Nov 14, 2007
when I use the range.find function to find a certain value in a column.. i want to return the address of the cell.. and save it in a range variable. how would I do that?
so this is what i have now.. but Rng does not return as a range.. it returns 69... when i use ctrl + G and type ?rng
set rng = .range(A:A).find(what:=69, After:=.Cells(1, 1), Searchorder:=xlByRows, searchdirection:=xlPrevious)
ok so say it picks up..... cell A69... how do i get it to save range A69
View 9 Replies
View Related
Sep 7, 2006
Let's say Cell is a cell.
How do we select this cell's column? I tried :
Cell.Column
but it doesn't work. I have an error message.
View 7 Replies
View Related
May 18, 2007
I have a list of ID's on one sheet that are also located in a large matrix on another sheet.
This macro uses the Find_Range function to find each ID within the matrix and return the column header where the ID was first located.
There is also a line which return a list of ranges, indicating all the places where the ID was found.
What I want is to convert the list of ranges into a list of corresponding column headers (ie row 1 of all columns in the range)
' Number of id's in list
RowCnt = Application.WorksheetFunction. CountA(Columns("A"))
For I = 2 To RowCnt
LookFor = Sheets("ID List").Range("A" & I)
Set InRng = Sheets("Matrix").Cells
Set Found = Find_Range(LookFor, InRng, xlValues, xlWhole)
On Error Resume Next ' If value is not found
Sheets("RateID Count").Range("C" & I) = Sheets("Matrix") _
.Cells(1, Range(Found.Address).Column) ' Return column header
Sheets("ID List").Range("D" & I) = Found.Address(False, False) ' Return cell address or range of addresses
On Error Goto 0
Next I
View 9 Replies
View Related
Sep 15, 2007
I am trying to create an XY scatter plot with multiple series. Normally, one has to manually type in or mouse-drag a range for each x series and y series. Instead I would like to build these two ranges (x and y) with text functions and place them in a cell.
For example:
A1: 'data'!$C$3:$C$10
B1: 'data'!$D$3:$D$10
Then, when I create a chart, instead of mouse-dragging, for the x-series, I'll indicate the range that's specified within Cell A1, and for the y series, that which is in B1. I would then repeat this for each series. The reason I want to do this is because I have dozens of series and dozens of graphs and it is relatively easy to programatically identify the range boundaries, but long and tedious to mouse drag them.
View 3 Replies
View Related
Sep 15, 2007
I have a sheet with multiple tabs - 1 per employee. I'm trying to run an index on a select tab based on the contents of a cell in order to do a summary across all employees/tabs.
The person's name is Tulley and is listed on the summary page in cell A11. =INDEX(TULLEY!$B$4:$M$5,1,$B11) returns the correct value. I would like to replace the tab reference with the name of the person concatenated with an exclamation point. This yields TULLEY! -
INDIRECT("A11")&"!". I thought that I would be able to replace the TULLEY! in the index formula with the indirect formula. This formula returns TULLEY!, but the index function doesn't work: =INDEX(INDIRECT("A11")&"!"&$B$4:$M$5,1,$B11).
View 6 Replies
View Related
Jul 16, 2008
I am looking for a formula that returns the cell address of the last cell > 0 in a range.
in the example: A1CLA23 8
4546557528
the result should be A7.
View 9 Replies
View Related
Dec 12, 2012
Here is a sample of database,
A
1
Jan-12
2
Feb-12
3
Mar-12
4
Apr-12
5
May-12
6
Jun-12
7
Jul-12
8
Aug-12
9
Sep-12
10
Oct-12
11
Nov-12
12
Dec-12
If i lookup a value in the range A1:A12, say Sep-12, i need to get the cell address instead of the value of the row. but i know how to get cell address using CELL function. but i need to get cell address when i lookup the value.because lookup value will be dynamic.
View 5 Replies
View Related
Aug 18, 2007
I am setting a variable to the value of an absolute cell reference. I want to set the value of another variable to just the row value of that absolute cell reference.
View 4 Replies
View Related
Jul 3, 2009
I am performing a lookup using the populare user defined function nlookup, which does not take a lookuparray argument to find lookup values. But I only want to return lookup values that fall into a certain array. To accomplish this, I figured out that I need a way to specify a condition of the type "if cell address of lookup value falls within range"
It should be possible if I find a way to return the cell address of the nlookup value, but as nlookup is not limited by a lookuparray argument, so I was not able to use the address/index/match that come up in similar questions.
View 3 Replies
View Related
Sep 27, 2011
I have a query on retrieving the result from a set of range from other sheet.
Query: In the Sheet1 Column B has to take first two words from the
Column A & lookup the matching results from Sheet 2.
(The search range should be the first two words of each cell)
Result: The complete sentance in the Cells (First Two words) should get placed in the Sheet1 Column B
Example: The Expected result should be as mentioned below. (Blue in color should be the results)
Sheet1A BC1NameResults2abc def fkfeabc def words3ghi jkl kikgN/A4mno pqr stu lkasmno pqr must work5
Don't give my book don't give up6vwx yzyvwx yzy not7xwv uts rqpxwv uts yes8omn lkjN/A9ihg fed cbaN/A
Sheet2A BC1Lookup Data2abc def words3xxxghi jkl4yes you have to5don't give up6no you will not7mno pqr must work8vwx yzy not9Excel work10xwv uts yes11omn mre lkj12ihg not fed 13not work14
This is my query
View 7 Replies
View Related
May 20, 2014
Assume the following list of addresses are all in separate cells of a single column (A1-A4). I just need the formula to extract the street addresses, and then a separate formula to extract the zip codes.
5430-44 PASCHALL AVENUE PHILADELPHIA, PA 19143 OPA/BRT#: 884350845
4010 MARPLE STREET PHILADELPHIA, PA 19136 OPA/BRT#: 651087200
2618 SOUTH HOWARD STREET PHILADELPHIA, PA 19148 OPA/BRT#: 391251216
5737 WOODCREST AVENUE PHILADELPHIA, PA 19131 OPA/BRT#: 522155600
View 2 Replies
View Related
Jan 28, 2009
I am trying to get the data out of a cell and put it in a textbox in my userform.
What I have is a Worksheet that has autofilter on. After the user clicks certain objectbuttons, there is only one row, that has data in it, displayed. The cell I'm after will always be in column A and be the second visible row.
View 5 Replies
View Related
Nov 24, 2009
I have the following in Column A. 01. Artist - Title
I manage to put 01 in Column B and Title in Column D
I am struggling to split between the "." and the "-" to show Artist in Column C
I am using in Column B
View 3 Replies
View Related
Jul 17, 2013
I'm very new to excel. I need a formula to put in a column (I) that returns ONLY a five-digit zip code from the adjacent cell in column J, which is a full address. Nearly every entry is written differently, and many do not contain a zip code. I would like the cell to be blank if the cell in J contains no zip code .
I'm using the formula:
=MID(J5,MATCH(TRUE,ISNUMBER(-MID(SUBSTITUTE(J5,"","#"),ROW(INDIRECT("1:"&LEN(J5)-4)),5)),0),5)
This formula sometimes returns -**** format numbers, considering them to be negative and still five-digit. It also returns #N/A if no zip code is present, and I would like this to be blank. I'm sure I can nest the formula within an IFF, but have not been able to make it work myself.
View 4 Replies
View Related
Aug 6, 2014
I am currently struggling with a spreadsheet that has been created in Excel 2007. Essentially, it has a number of items (individually identified by "S code" in the first column) that need to be tested at the specific dates over a one year period (i.e. at "2 weeks", "4 weeks", "8 weeks", etc) as shown in the screenshot below.
A user manually enters "Complete" into the corresponding cell in the "In-testing status" section of the spreadsheet when testing has been completed for a certain item at a particular time point.
Screenshot.jpg
I already have set up conditional formatting that highlights cells with dates older than the current date red. What I need to do now is to check for a particular item and date whether or not the corresponding "In-testing Status" cell reads "COMPLETE". If it does, I need to use a conditional formatting rule to return formatting to normal.
What I am unsure of is how exactly to retrieve the value of the corresponding "In-testing Status" cell.
Unfortunately I can't use a macro-enabled workbook in this environment
View 14 Replies
View Related
Nov 17, 2011
I am trying to find dates & time within text in a cell & return to a separate cell. The issue I have is that the date format varies frequently. I also can't rely on searching for "Sent:" as this also varies frequently
e.g. From: ########
Sent: 17 November 2011 11:57
I would like to return 17/11/2011 11:57
From: #######
Sent: 01/11/2011 11:50:13
I would like to return 01/11/2011 11:50
From: ########
Date: 05/11/2011 09:45:13
How can i search for various forms of dates and return them into a cell?
View 2 Replies
View Related
Apr 20, 2006
i need to find a way to search for numbers in a cell that are attached at the end of a group of letters. ex. (xxxxxxxxx01-01-001). i want to search backwards in the cell going right to left. what i need to do is once i find the numbers i need to go to the last number ex. (......x01-.....) and in front of it place a space ex. (......x 01-.......). right now i havent come up with a formula that can do this.
View 9 Replies
View Related
Feb 13, 2014
I need a macro that will work through a range, find the first non-blank cell, put that cell's info in another cell, then continue from where it left off and find/record the next non-blank cell. And the next, and the next, until the range is completed. If A1 had "1" and A5 had "2" and A10 had "3" then record those ,say in C1:C3 "1", "2", and "3".
I can find the first cell, but can't continue where I left off to get the next.
View 4 Replies
View Related