# Returning Last Non-blank Value In Horizontal Range?

Apr 25, 2014

I want to be able to return the value of the last non-blank cell in the horizontal range L3:BF3. This would need to account for any blank cells that might occur within the range. Those 'blank' cells would contain formulae and the non-blank cells would contain GCSE grades from A* down to U or National Curriculum levels in the format nx (e.g. 3a). I would need to be able to copy the formula down to other rows. The reason I'm not keen on an array formula is because they can slow things down, as I understand it.

I'm afraid I don't have a sample worksheet as this is all, for now at least, an emerging plan in my head. I should probably add that the grades will not necessarily increase in value in the range, so we're not looking for the largest.

## Transpose Vertical Range Of Data Into Horizontal Range

Jun 17, 2014

Simple transpose question: Lets say I have a verticle range of data from B3:B13. I wish to have code that will transpose that data into a horizontal range at D3:M3, is that possible?

## Returning 0 Instead Of Blank

Oct 16, 2012

Below formula matches two criteria

=SUMPRODUCT(('[Value.xlsx]test!\$B\$5:\$B\$50=\$B5)*('[Value.xlsx]test'!\$C\$5:\$C\$50=\$C5)*('[Value,xlsx]test'!D\$5:D\$50)).

What it does is:

Matching B5 value in range B5:B10 of tab "test" in worksheet "Value"

Matching C5 value in range C5:C10 of tab "test" in worksheet "Value"

AND capturing the matching value in range D5:D50.

The problem is that i am getting 0 if the matching value is a blank or 0.

I want the formula to return nothing (i.e. blank) when the matching value is blank and 0 only when the matching value is actually 0.

## Returning 0 From Blank Cell

Jan 7, 2013

I'm linking one sheet in a workbook to another. The formula is simple,

If there is data in the cell, it replicates it which is what I'm after. However if there is no data in the cell it returns a "0", not what I want at all.

## Sum Returning Blank Cell

May 28, 2009

I have a current formula using SUM formulas obviously in the answer cell the answer is returning 0 due to no data inputed, how do i make the cell show empty.

eg. =SUM(A1*A3) returns answer 0 need cell to be blank.

## Returning Blank Where Criteria Not Met?

Oct 22, 2011

I am using the following formula to return an "F" in the cell. If there is no "F" it just returns "#N/A". Is it possible to have the cell blank instead of the #N/A? If so how do I do it?

=INDEX(E1:E99,MATCH(1,(A1:A99=Selections!J5)*(E1:E99="F"),0))

and then ctrl + shift + enter

## Nested IF / AND Returning 0 Instead Of Specified Blank?

Apr 14, 2014

My formula is returning a 0 when true instead of being blank as specified. If I designate a value other than "blank" (i.e. "A Word") it still returns a 0. What am I doing wrong?

=IF(AND(CBAuditType="PHYSICAL",TxtInsuredName=""),"",TxtInsuredName)

## Formula Cell To Be Blank (Vlookup Returning #N/A)

Nov 13, 2008

If it can not locate the correct responce I want it the formula cell to be blank. How do I adjust my formula to do this?

This is the forumal I am currently using
=VLOOKUP(A26,Subs!A:F,5,0)

I have also tried this one as well
=IF(ISNA(VLOOKUP(A6,Subs!A:E,5,0))+(VLOOKUP(A6,Subs!A:E,5,0)=""),"",VLOOKUP(A6,Subs!A:E,5,0))

## Excel Web Query Is Returning Blank Data?

Jun 23, 2013

I am trying to get data in excel sheet using web query from the following web link:

But I the data returned is a 'hypen' (i.e. a dash symbol). I am getting the row/column headers but not the figures or the numbers under them.

## How To Get Referenced Cells Returning Blank Cell Instead Of Zero

Apr 6, 2014

Referenced cells returning zeros: can these be made blank or string data?

But why I still get the value 0 instead of blank cell when I press ctrl+shift+enter?

My formula = IF(U15="Bank", PROPER(E15),"")
and E15 = VLOOKUP(B15,'Customer Data'!\$D\$6:\$K\$100,3,FALSE)

## Trigger Formula - Returning Blank Cell

Dec 19, 2011

I am trying to trigger a formula if a cell (B2) is populated (with anything) but if it is blank for the destination cell to remain blank.

The formula I am trying to trigger is =IF(G18=0,100,100-(100/(1+H18))).

## Combining TODAY Formula And Returning Blank Value?

Apr 11, 2014

I'm currently using the following formula to return either a "PAST DUE" or "DUE" value in a particular cell based on the date entered in the cell in the previous column.

=IF(AND(TODAY()>=BG43+5,TODAY()=BG43+10,"PAST DUE",""))

However, if the reference cell is blank the formula automatically triggers to put in "PAST DUE" as the value. I would like to modify this formula so if the reference cell is blank that this cell will also remain blank. I've tried a few different options, but I'm getting an "too many arguments" error on what I've tried.

## Sum Range Using Both Horizontal And Vertical Criteria?

Sep 19, 2013

I am trying to create a formula that will sum a range based on both horizontal and vertical criteria using the following data:

1
2

1
20%
25%

2
40%
25%

3
40%
50%

For example, if the horizontal criteria were "1" and the vertical criteria were "2", I need to sum the 20% and 40% amounts (60%). If the horizontal criteria were "2", and the vertical criteria were "3", I would need to sum the 25%, 25%, 50% (100%). I have tried using SUMIFS functions, but they do not appear to work with both horizontal and vertical axis criteria (I receive a #VALUE error).

## ComboBox RowSource From Horizontal Row Range

Mar 17, 2008

Normally the combo box will reading the data range from top to bottom. Is there any way to allow the combo box to reading the data from left to right? when i cover, it only reading the first cell of data range.

## Populate ComboBox And TextBox With Horizontal Range?

Nov 14, 2012

I've done define name to read column C until G in 1st row, N define another name from column C until G in 2nd row.For example; NameRanges for "Year" =OFFSET(Sheet2!\$C\$1,0,0,1,COUNTA(Sheet2!\$1:\$1)-2), for
"Thickness" = OFFSET(Sheet2!\$C\$2,0,0,1,COUNTA(Sheet2!\$2:\$2)-3)

I want to display list of year in combobox and then, when the user click on the first item in combobox, the textbox will display the value that correspond to the combobox. For example; when the user click Year = 1990 in the combobox, the textbox will take value from excel and display thickness for year 1990 which is 4.

This is my code, the code in UserForm_Initialize is working. unfortunately, coding to display value in TextBox1, doesnt work.

VB:
Private Sub UserForm_Initialize()

Dim rngYear As Range [code].....

## Sumifs With Horizontal And Vertical Criteria Range?

Mar 6, 2014

I am trying to devise a formula for the data set below (into a different tab). The table below is something like what I have:

Day 1
Day 2
Day 3
Day 4

[Code]....

Though my table is a bit more complicated (it has empty rows in between and a much larger data range).

I need to reflect this in another tab in the following format:

Day 1
Day 2
Day 3
Day 4
Spoke 1
Spoke 2
Spoke 3

As I fill in data in the first tab, I would like this tab to automatically pick it all up. Is there any way I can do this? I may add rows etc. so I do not want a simple addition.

## Find First Blank Row Ignoring Formulas Returning Empty Text

Oct 2, 2007

I have a range that is filled with formulae and the the number of rows in the range with data changes as the formulae reevaluate the inputs. So the rows with visible data changes between one row and 200 rows. By looking at the output in the first column of the range, Col M and finding the last row where the formulae returns data, I need a way of selecting across the columns of the range (M1 through to Qi) where i is the number of rows that have data in.

## Referenced Cells Returning Zeros: Can These Be Made Blank Or String Data?

Aug 30, 2007

I have a summary worksheet consisting of columns that are referenced to other sheets within the same workbook.

If the cell in the 'referring' (original) sheet is blank then the forumula returns a zero instead of a blank in my summary worksheet, which is messing up some other calculations.

Is there a way to make these cells truly blank, or possibly into string variables instead, so that they do not interfere with my calculations?

## Excel 2010 :: Horizontal Axis Labels Not Updating Range - Have To Update It Twice To Stick

Jan 28, 2013

I recently switched to Excel 2010 and have a rather peculiar problem.Every week I update a bunch of charts in different workbooks. By update, I pretty much mean just shifting the range over one column or down one row to incorporate newly added data.

So I right click the chart, select "Select Data", update all the Data series ranges and then I click on the Horizontal (Category) Axis Labels button "Edit" to update the Axis label range.

I do all that then press OK. The data series have updated, but the axis labels haven't. So then I do the procedure again for the Axis Labels, hit OK again and voila: It worked.

But I ALWAYS have to do this procedure twice. It will NEVER update the axis labels the first time around. Even though the little preview window below the edit button show the labels correctly.

## Count Blank Cells Within A Range Not Including Fully Blank Rows

Jul 15, 2008

I can count the blank cells withiin a range using

But I dont want it to count the cells if the entire row, within that cell, i.e. C6:AD6, is blank.

It should only count the blank cells within a row if there has been some data entered on that row..provided it has been entered within the specified range.

## Returning A Range Of Cells?

Jun 3, 2009

Just for fun (and a massive headache) - I am trying to do the following

=IF(INDIRECT("'"&\$Q\$1&"'!E2")="Table",IF(INDIRECT("'"&\$Q\$1&"'!H2")="Yes","Graph","Table"),IF(INDIREC T("'"&\$Q\$1&"'!E2")="Descriptive",INDIRECT("'"&\$Q\$1&"'!J2")," "))

Where Q1 is the name of the worksheet I want to access.
Where E2 is the type of information I am trying to display (Table or Descriptive)
Where H2 is if it needs a Graph or Not
Where J2 is a comments field

What I am wondering is if the following values are set

Q1= May-09
E2 = Table
H2 = No

How can I get it to return the information contained between cells P2 to S3 on worksheet May-09

## Querying Date Range And Returning A Value?

Jul 28, 2014

I am trying to set up a query to search a date range within a table in one sheet based upon a more narrow date range in a second sheet AND return a simple count, median currency value or value based upon a ratio (see attachment).

Note: the Sale Price, List Price and Supply values will be based upon the filtered date range (each quarter) and return a value based upon that range. The Sale Price and List Price also need to be a median within each quarter value so I can chart the data.

Help.pdf

Here is what I need to return:

Num Sales - simple count from each quarter

Num Listings - simple count from each quarter

Sales Price - median value within each queried date range

List Price - median value within each queried date range

Supply - numeric value based upon absorption rate, supply = listings each quarter / absorption rate (absorption rate = sales each quarter / months each quarter)

## Returning Two Highest Numbers From A Range?

Jul 5, 2012

I have a row of upto 20 numerical entries, (1,1,2,2,10,10,3,3,4,5,6,7,8,12,1,1,7,8,9,11) what formula do I use to go about getting excel to return the two highest numbers?

In this example I'd want excel to return the numbers, 12 and 11

## Returning Most Occurring Text In A Range

Jun 6, 2014

Store 1
Store 2
Store 3
Store 4
Top Selling
Second
Third
Fourth

[code]....

I am trying to find two formulas:

Formula 1: Formula 1 will be entered into rows 6:9 (in this example). I need it to return the highest selling product (by store) in order form highest selling to lowest selling. I have a makeshift formula already but it cannot report in order (only the highest selling) and it cannot get past the one return index( limitation. When it finds two high sellers it prioritizes the ranking based on how well that product has sold across the other stores. Product 1 sold 13 times across all stores. Product 2 sold 9 times across all stores. So if product 1 & 2 tie for Store 3 (as shown in the example) Product 1 would be chosen based on its sales across the row.

Formula 2 : Same as formula 1 but with Stores (in column 6-9). It reports the highest selling store and treats ties the same way as formula 1.

## Range().Value = Now Returning Time In Multiple Rows

Apr 30, 2008

The purpose of my code is to time production cycles for heavy equipment. There are five - six segments in the cycle, and it's possible that not every segment is included in each cycle. It's also possible that the cycle will not go in sequential order.

Here's a snippet of
Sub MacroD()
Dim LR As Long
LR = Range("D" & Rows.Count).End(xlUp).Row + 1
ActiveSheet.Unprotect
Range("D18:D" & LR).Value = Now
UserForm1.ListBox1.Text = "Time"
UserForm1.ListBox1.SetFocus
' UserForm1.Show
End Sub

Sub MacroF()
Dim LR As Long
LR = Range("F" & Rows.Count).End(xlUp).Row + 1
ActiveSheet.Unprotect
Range("F18:F" & LR).Value = Now
UserForm1.ListBox1.Text = "Time"
UserForm1.ListBox1.SetFocus
' UserForm1.Show
End Sub

My problem is that when the macro runs, it returns the time in more than one row and overwrites the previous timestamp. It starts in row 17, and will record the first time in 17 and 18. When the macro is run again, the time will be recorded in 18 and 19. When it's run a third time, the timestamp is recorded in 18, 19, and 20. So essentially, I'm losing all of my previously recorded data. When I finish, all I have left is the timestamp in row 17 and whatever the last time recorded is.

## Returning Advanced Filter Results Into Row Not Range

Jun 7, 2006

I am trying to create an advanced filter that filters my results into a row.

e.g.

Shane
Shane
Tom
Tom
Paul
Mike

would return

Shane Tom Paul Mike

I have tried changing this piece of code

The problem is with

CopyToRange:=Rows("25:25")

I have tried using Range instead of Rows but I am not having any joy.

## Returning A Certain Result Based On A Specific Data Range

Nov 26, 2009

I have a problem with a calculation i am trying to do. I have to calculate holiday allocation for staff but i my company also offers length of service bonus days. After 5 years you get 1 extra day, after 10 years you get 2, after 15 you get 3 and so on. In my sheet i have a formula based on their start date that tells me their length of service in the following format: 10 years, 2 months.

I have put an IF Statement in for each of the different milestone criteria but the result is not coming back so i know i am missing something. Is there something wrong with the formula itself or is there a better one that will allow me to put the start and end of the range i want it to look at? For example can i tell it to say if between 5 years and 9 years 11 months put 1, if between 10 years and 14 years 11 months put 2 etc in column H.

## VBA Returning Cell Range From Multiple Rows And Columns?

Apr 24, 2014

I'm attempting to match a name with the row and column numbers of data that is laid out in a grid format. It looks something like this:

Denson
Matthews
Smith

[Code]....

This works just fine, except for the fact that once in awhile the same name will appear in the grid twice, and the row and column returned will be off (it will return the row for one of the Smiths, for example, and the column for the other).

I know why this is occurring so I'm looking for a better way to do this. The good part is that I don't necessarily need both locations returned for each "Smith" ; I just need the correct row and column for at least one of the instances. I'm looking for a better way to do this.

## Type Mismatch Error In Returning Range Element

Dec 31, 2009

For some reason get a type mismatch error on when I try to determine the rth member of summation range. I have highlighted the relevant part of the code in bold. It is strange as I can obtain the address.

If ((All_nurse_names(r, 1) = nurse_name) And (All_status(r, 1) = status)) Then
Debug.Print "test " & r & " " & summation_range(r).Address & " " & val(summation_range(r))

total_hours_in_shift = total_hours_in_shift + (summation_range(r))
End If

## Inputbox Method NOT Returning Multi-cell Range Object

Jun 15, 2012

I have the following code in Destination.xlsm that is intended to:

request the user to select a multi-cell range in a column of single-sheet Source.xlsm, in which some but not all cells contain "Y" (to indicate that this row of data relates to a National Account, versus a Territory Account)loop through the selected range, and whenever a cell contains "Y", copy the entire row and insert it in Destination.xlsm above a cell named "rngDest".

Code:

Sub Copy_NationalAccounts_Rows()

Const Message As String = "Select the entire range containing National Account Y flags, then press Enter or click OK."
Const Title As String = "Copy National Accounts"

Dim rngSource As Range
Dim rngDest As Range
Dim r As Range
Dim c As Integer
Dim wbk As Workbook

[Code] ........