Filtering & Deleting Non Numerical Values Throughout Worksheet

May 11, 2006

how to find a certain criteria and delete the entire row that the criteria is in. I am more interested in finding certain criteria with vba, in my case any text/non numerical values and clear contents from that cell for the entire worksheet while retaining the rest of the cells that have numerical values in them. My data has --- in cells that represents missing data which would be easier if it was completely blank.

View 2 Replies


ADVERTISEMENT

Filtering And Deleting Rows With VBA Code

Aug 19, 2008

I've got a row of data with a column showing some sales including amounts with 0. Any row with 0 I want gone, so I want the macro to filter the list, delete all the rows with 0 in that column, and then display what's left, all the rows with some number other than 0 in that column.

The code below should filter the 0 rows, delete those rows, and then display what's left. I don't want the heading row deleted, but everything below it that is filtered. What my code below is doing now is not deleting everything it should. How can I fix it.

Sub prepmetrics()
'
' prepmetrics Macro
' for use with monthly report - don't forget the new coversheet
'
Application.ScreenUpdating = False

Range("A7").Select
Selection.AutoFilter
Selection.AutoFilter Field:=14, Criteria1:="0"

' this is the challenge here. How do I tell Excel to select, relatively, whatever
' rows are now showing as a result of the filter?

Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.ShowAllData

' there may be a number of different criteria in different columns, so
' we rinse and repeat as many times as necessary but, again, each filter/delete
' task should delete all rows filtered

Selection.AutoFilter Field:=16, Criteria1:=">7500"
Selection.Delete Shift:=xlUp
ActiveSheet.ShowAllData

Application.ScreenUpdating = True

End Sub

View 9 Replies View Related

Auto Numerical Values

Jul 25, 2009

creating functions in excel and would like to hire someone who can assist me in creating the following functions: Column A (For Numerical Values Less Than or = to 100): Column B Value should be (+10)

Example 1: If a numerical value of 90 is placed in Column A then Column B Numerical Auto Value should be 80+10 (190). Example 2: If a numerical value of 35 is placed in column A then Column B Numerical Auto Value should be 35+10 (45) and so on. Another important point is that if the values in column A are copy and pasted Column B should automatically discharge the values visibly as the examples stated above is this possible? If not i'll need to have this done.

Also there are other numerical values that must be added in Column A (basically for every increase in numerical value of 100 there are to be different numerical plus factors in accordance to Column A). Column A (For Numerical Values greater than 100 but less than 200): Column B Value should be (+15).......

View 4 Replies View Related

Set Up An If Statement That Where 'a' And 'b' Are Numerical Values

Jan 25, 2010

I want to set up an if statement that does the following, where 'a' and 'b' are numerical values.

If 'a' is not a multiple of 'b' Then
...
Else
...
End If

How can I write this so VBA can understand it?

View 2 Replies View Related

Sorting Numerical Values

Apr 6, 2006

I've got a series of values in a column as follows:

10 Mb
10 Mb
1000 Mb
1000 Mb
114 Mb
128 Mb
128 Mb

Obviously 1000 mb is more than 10 mb, but it sorts as second in the list
because it starts with a "1". How do I tell Excel to sort by the entire
numerical value instead of the first number?

View 9 Replies View Related

Returning Only Numerical Values

May 11, 2009

it seems that excel is deciding what type of array this is by evaluating the type of the first cell in each column and applying this type to the rest of the array's column. Problem is that i want all values to be brought in, text and numerical.

Dim VArray As Variant
Sub DA201()
If FileThere(Path & "DA201.xls") Then
GetDataTowers Path & "DA201.XLS", "", "DataRange", Sheets _("Towers").Range("CStart"), False, False
Else
MsgBox ("File DA201.xls not found. Click OK to continue")
End If
End Sub

Public Sub GetDataTowers(SourceFile As Variant, SourceSheet As String, SourceRange As String, TargetRange As Range, Header As Boolean, UseHeaderRow As Boolean)
Dim rsCon As Object
Dim rsData As Object
Dim szConnect As String
Dim szSQL As String
Dim n As Integer
Dim row, m As Integer

If Val(Application.Version) < 12 Then
szConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & SourceFile & ";" & _
"Extended Properties=""Excel 8.0;HDR=No"";"
Else....................................

View 9 Replies View Related

Avoiding Non-numerical Values In A Range

Jan 1, 2009

I have a range, A1:A10 that I want to sum, min, and max. I want to ignore any text or #DIV/0! values in this range. I know how write the formulas except how to ignore the text and cell errors. Can someone steer me in the right direction?

View 5 Replies View Related

Convert Levels To Numerical Values

May 29, 2009

I need to convert levels to numerical values and then: Firstly, add together two vlookup values THEN divide by 2 to get an average AND THEN see if this average AND a second, individual lookup value are above a specified another value, which may be different. IF all these criteria are set, return, "yes" if either the first or second, or both criteria are not met then "no"

Or put it another way. if lookup values A+B/2>"5" AND C>"3" then "yes", Else "no"

Lookup chart:

P11
P22
P33
P44
P55
P66
1c7
1b9
1a11...............

View 3 Replies View Related

Assigning Numerical Values To Words

Mar 9, 2013

I'm making a spreadsheet for the homes I'm looking at purchasing and wanted a way to calculate automatically which one has the most things we're looking for.

So for example, if a home has a walk in closet, it would say "yes". If it doesn't it obviously would say "no".

Is there a way to assign a number value in a totals column where "yes"=1 and "no"=2?

Or a way to make colors equal a certain value?

Where I'd make all the "yes" items green and then a green cell = 1, a yellow cell = 2, and a red cell = 3.

View 5 Replies View Related

Conditional Sum From Matrix With Non Numerical Values

Feb 27, 2012

I am trying to conditionally sum numbers from a matrix. On the vertical axis, there will be duplicate values (text) who's rows should be summed, and on the horizontal axis I need to sum in between two numbers that will be in sequential order (such as dates). The real tough part for me is that the data field that I will be summing from has non numerical values, like dashes. Obviously, I don't want to sum the dashes, but it throws off any formulas I have tried (like sum arrays).

My hopes are to use as little memory as possible so my file size wont get too big and to not have to use macros (I do not really use them), although I am willing to try if they are basic.

In the example below, I want to sum rows for the letter "A" and in between numbers "2" and "4."

# 1 2 3 4 5
A2 6 5 4 2
B4 5 6 4 1
C-----
A4 2 1 2 1
E1 1 2 2 2

Y Variable: A
X Variable Min: 2
X Variable Max: 4

Correct Result = 20.00 = (6+5+4+2+1+2)

View 3 Replies View Related

Remove Symbol From Numerical Values And Add?

Mar 19, 2013

I often have to OCR files in Adobe and then copy the data as a table into Excel. Sometimes when I move the data over these little boxes with question marks inside will appear infront of the data in the cells. I can delete the square from the spell by just backspacing after it but I don't want to have to do that for hundreds of cells individually. Googling around I found a formula: =RIGHT(A1, LEN(A1)-1)

That formula will get rid of the box, once the box is removed I need to be able SUM the values, but I am still unable to. I've tried to copy and paste the values before using the SUM function but that does not work, I've also tried to SUM before removing the box but that does not work either. I've found that if I double click in the cells after using the formula that it will allow me to use the SUM function but that would require me to double click hundreds of cells individually. Also, just in case this matters, a little green flag appears in the upper left corner of the affected cells after I use the previously mentioned formula.

View 4 Replies View Related

Assigning Text Numerical Values

Jul 9, 2006

Is it possible once you have assigned text a numerical value (example: Adam = 12) to add them together? (example: adam =12 and bob = 8, therefore adam + bob = 20)

View 9 Replies View Related

Sumproduct With Multiple Criteria Using Non Numerical Values?

Feb 5, 2014

I am attempting to count from a spreadsheet the reference number of a customer (numbers and text) based on two criteria.

1, If column G= Requested
2, Column I = Meeting

Count Row E

I thought a sumproduct was best and have started using it for the first time, I thought this should work but I keep getting a #NUM! error.

I have tried with numbers and it works but the non numeric aspect is difficult.

[Code].....

View 14 Replies View Related

Summary Of Numerical Values, Based On Several Conditions

Oct 16, 2008

I am trying to do is a summary of numerical values, based on several conditions.

column a column b column c
local loop live cross connect
loop A cancel 100
long haul live 10000
long haul pend canc 1000
loop Z live 100
x-conn live cross connect


In column a, i have several choices and i want to focus on those choices that fall into column B "live" or "pend canc" and then only have numerical data in column C

I've tried several different formulas like

=SUMPRODUCT((a30:a38="Loop A")*(a30:a38="Long Haul")+(b30:b38="Live"),cX30:cX38)

I know the result of this should be 111000 but it's not working...I usually get n/a. I know about using cntl-shift-enter to use the formula properly.

I can get one variable to sum up properly using =SUMIF(M9:M21,"Live",BW9:BW21)

but, that leaves out anything that is pend-canc

I have also tried =SUM(IF((a9:a21="long haul")*(b9:b21="live"),cX9:cX21)) which gives back a value that is accurate.....

View 8 Replies View Related

Multiple Criteria - Vlookup For Numerical Values

Aug 28, 2009

I have the following 'numerical values'

2510000.011
3010000.011
3510000.011.3
2518000.032.5
3018000.043
3518000.043.7
2530000.125.5
3030000.145.8
3530000.176.2

With the first two values as criterias, I need to find the 3rd and 4th value
Example: If I have the criteria as 30 and 1800 , I should get the result as 0.04and 3

View 10 Replies View Related

Find Numerical Difference Between Text Values

Nov 21, 2008

Hi all, first post here.
I've been asked to do something in excel i can't seem to get my head around.

My client provides me with data in the form

1c, 1b, 1a, 2c, 2b, 2a, 3c etc... where 1a is the lowest.

I need to find a way of working out the difference between these, e.g.
edit: 2a - 1c = 5

I've been working on it and have made some headway by splitting these with MID function and then using CODE to try and work out a unique ID for each, but i can't help feeling there's an easier way!

View 9 Replies View Related

Assign Numerical Values To Text To Allow Calculations

Jan 31, 2010

I am working up a workbook template that will be used to process survey results. The way I ultimatley want it to work is that the user can paste data from another application into a worksheet in Excel, and then view analysed results on a second sheet (which are processed via formulae on a third, hidden sheet).

The problem I have is this: the data from the program that's capturing them are text values. For example, column B contains answers to a question where participants rate an experience, and the values are either "Excellent", "Good", "Fair", "Poor", "Awful". I want these to be converted to numerical values, on a scale where "Excellent" = 5 and "Awful" = 1, so that I can then average these.

So, the question is: Can I somehow tell Excel that "Excellent" = 5 and "Good" = 4 etc, and then use AVERAGE(B:B) on the text data and get a number back?

I did think of having an intermediate sheet that used VLOOKUP to create a copy of the first sheet (where the user pastes the text data) with the text replaced by numbers. But, because I don't know in advance how many rows will contain data (i.e. how many survey results there will be), I have to assume on the high side and copy down 50,000 rows. But, this takes ages to calculate.

View 9 Replies View Related

Applying Numerical Values To Letters In Formula

Feb 28, 2007

I'm putting together an Environment Threat Assessment for work and want to automate as much of it as I can to alleviate the amount of time ppl have to spend putting values in. My main problem is I have three very important columns: Likelihood, Success Rating and Risk Rating. Likelihood and Success Rating values will be selected from the following:

VL - Very Low
L - Low
M - Medium
H - High
VH - Very High
Each of these is given a value: VL = 1, L = 2, M = 3, H = 4, VH = 5.
The Risk Rating is the result of multiplying the Likelihood and Success Rating. So a Likelihood of Medium and a Success Rating of Low will give a Risk Rating of 6. Therefore, the cells on my spreadsheet would look like this:

Likelihood Success Rating Risk Rating
M L 6
The issue is I want a couple of things to occur. Firstly I want keep the values in my Likelihood and Success Rating cells as letters (ie. VL, H, VH etc) rather than numbers, while still generating a number result in the Risk Rating cells. Secondly I'd like to be able to change the colour of the Risk Rating cell to reflect the number it gets assigned. For example Green for < 8, Amber for 9 – 14 and Red for 15 – 25. I've been trying to do this with array formulas and am basically going around in circles with no success.

View 3 Replies View Related

Assign Numerical Values By Letter Across A Range

Dec 17, 2007

I have a formula that counts all instances of the letters a, b and c in a range and assigns them a value of 1 unless they are in the M column in which case a, b or c counts 4.

=SUM(COUNTIF(J2:AB2,{"a*","b","c"}),OR(LEFT(M2)={"a","b","c"})*4)

This worked well but now I need to modify the weightings across this range. My new goal is to count all instances of a,b and c in the range J2:AB2 but have M column a,b, c's = 2 and N:R column a,b,c's equalling 4. Letters other than a,b or c count as 0.

Example:

J2...K2...L2...M2...N2...O2...P2...Q2...R2...
A....B.....B.....C.....B.....D....B.....C.....E

the output of the above sequence should be

1+1+1+2+4+4+0+4+4+0 = 21

View 4 Replies View Related

Assign Names With Specific Numerical Values

Feb 27, 2008

My company is soon to be rolling out a new payment system, and I'd like to be able to track commission for everything I sell. Briefly, we get paid via a percentage of the company's gross profit, and the way in which the company gets paid is tiered. (the cellphone business)

So, If a customer activates a plan thats below $39.99, we get paid X amount. If it's below $59.99 we get paid Y amount, and so on and so forth, there are multiple different tiers.

What I want to do is set up a list via data validation so that I can pick what plan they have (via the name of the plan) and have it return a numerical value (ie $39.99) and also have the ability to pick text messaging, etc as options so that the workbook will add the monthly rates (39.99 + 14.95) and then have it return value for the right priceplan tier.

If this is confusing, I apologize for not being more clear, but attached is an example. The top one is what I'm actually trying to code, but the bottom is completely filled in, so you can get a more clear sense of what I'm trying to do. Honestly I'm not even sure if it can be done.

View 2 Replies View Related

Filtering Data Not Appear On Another Worksheet

May 1, 2014

How to highlight, filter, or otherwise in someway mark all records on a spreadsheet that do not appear on another spreadsheet?

On Worksheet1, I have columns of data for First, Middle, Last, Clock Number, Address 1, Address 2, City, State, Zip Code and Employment Status. On Worksheets 1 and 2, the data and columns are 100% identical, except Worksheet1 has names I want excluded from a database import process I'll be running on the 2nd worksheet.

Is there an easy way or a quick VBA script that would allow me to highlight or filter out of Worksheet1 any rows that are not in 2?

View 1 Replies View Related

Filtering In A Protected Worksheet

Dec 12, 2007

I have a protected worksheet where I allow all users of the worksheet to filter yet when I filter, Excel gives a run time error 1004 - you cannot use this command in a protected worksheet. Could someone let me know what am I doing wrong?

View 9 Replies View Related

Filtering To A Separate Worksheet

Jul 25, 2006

I have a spreadsheet which is a list of dates and amounts.

I want to have a filter on a second worksheet wherein I can type the date and it will filter all amounts for that date.

I've tried the Advanced Filter but I can't get it to auto filter when I change the date. Also it needs setting up every time I do an advanced filter.

View 9 Replies View Related

Advanced Filtering To Another Worksheet

Apr 10, 2007

my VBA code to uniquely filter a column of values ( Cells E7:E65536) in Sheet1, and to paste the filtered results into column B (starting at cell B3) in worksheet Sheet4 in the same Excel workbook. Will the code below work?

More importantly, does the AdvancedFilter method allow for the filtered results to be deposited into another worksheet within the same workbook?

Worksheets("Sheet1").Range("E7:E65536").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Worksheets("Sheet4").Range("B3"), _
Unique:=True

View 3 Replies View Related

Inserting A Numerical 1 Or 0 Into A Cell Depending On The Values Of Two Other Cells

Jul 24, 2008

I'd like help writing a single formula that assigns either a numerical 1 or 0 to a cell based on values from two other cells.

By way of background, I'm working with three columns. Cells in column F contains values from 1 to 4. Cells in column G contain values from 5 to 11. Cells in column H are currently blank.

I need a single formula that will insert either a numerical 1 or a 0 into column H according to the following conditions.If F3 = 1 and G3 = 5 or 6 or 7 then let H3=1 otherwise let H3=0
If F3 = 2 and G3 = 7 or 8 or 9 then let H3=1 otherwise let H3=0
If F3 = 3 and G3 = 9 or 10 or 11 then let H3=1 otherwise let H3=0
If F3 = 4 and G3 = 9 or 10 or 11 then let H3=1 otherwise let H3=0

View 11 Replies View Related

Excel Automatically Pull Numerical Values From Websites?

Nov 27, 2013

I want to pull 'values' from a website off into column's "A" "B" and "C."

What I am looking for is:

Column A: The current date!
Column B: The closing VIX value of the day!
Column C: The 10-day-moving average value of the VIX for that same day!

All values come from this website: [URL].......

(full link so it doesn't look sketchy; also a link to mainwebsite: [URL] ..... )

What would be the formula for this? Or how would one go about this? And preferably the time to pull these values would be at alterable, but ideal time is hard to choose right now... Need to think about it!!!

View 1 Replies View Related

Macro That Converts Abbreviations Into Actual Numerical Values

Jul 22, 2014

I extracted data going back to 1980 from Bloomberg and realized that BB uses abbreviations rather than pure numerical values. For example, 3,000,000 is "3M," 300,000,000 is "300M," etc. I need a macro that converts "M" into the actual value, "B" into the actual numerical value, etc. For example, a macro that converts "3M" into 3,000,000. I know that I can identify the values in VBA with "###M."

View 7 Replies View Related

Single Cell Two Numerical Values - Multiply In Different Columns

Jun 27, 2014

I am looking for formula , single cell two numerical values , multiply in different columns

example :

Cell (A1) contain: =350,23+25,59 (two values in a single cell)

request:

in (B2) only first value so 350,23 multiply (x) by fixed number &in (C2) only second value so 25,59 multiply (x) by fixed number

View 2 Replies View Related

Sorting And Filtering The Records To New Worksheet

Jan 14, 2009

I need to do sorting and filtering the similar records to new worksheet. I need you help to do this job, give some idea or command to use for the following steps.

I have attached the worksheet newtran.xls.

1. I need to find the last column, the column will be increased or decreases. so that we need to find the last column at time of running the macro. Now the value is there till column DD

2. I need to concatenate the column B, D, F to last column find out at 1 step. Insert a new column and place the concatenated value.

3. Entire row will be Sorted based on concatenated value column.

4. Find the similar row on concatenated column and entire row need to be moved to new worksheet.

View 11 Replies View Related

Specific Criteria Filtering To New Worksheet

Apr 1, 2013

I am creating a workbook with multiple worksheets. When row H on the first worksheet matches certain criteria, I want the whole row that this specific cell is in to copy to a separate worksheet of the same workbook in excel so that a list of these rows automatically compiles. How do I do this?

View 1 Replies View Related







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