Excel 2010 :: Macro To Pull AP Within Specific Zip Code?

Jun 15, 2012

I have an excel 2010 spreadsheet that lists all of our vendors and the amount we spent with them over the last year.

I want to know how many of them were local vendors.

I have a list of all the zip codes within a 100 mile radius (there are about 500 zip codes). I would like to write a macro or sort function that searches the entire vendor list and only reports back those vendors that are included in the zip codes I specify.

The columns are as follows:

A B C D E
Vendor City StateZip CodeTotal AP
Vendor 1TROY AL36082527.37
Vendor 2PHOENIXAZ85054100
Vendor 3TUCSONAZ8571416255

I want to keep the all the columns, I just want to eliminate all of the vendors that do not fall within the zip code criteria I set.

View 5 Replies


ADVERTISEMENT

Excel 2010 :: VBA Code To Connect To SQL And Pull Records To New Worksheet

Oct 18, 2012

i found this code...

Code:
Sub Button1_Click()
Dim cnt As ADODB.Connection
Dim rst As ADODB.Recordset
Dim stSQL As String
Dim SNfound As String
'Your sqlserver 2008 connection string
Const stADO As String = "Provider=SQLOLEDB.1;" & _
"" & _

[code].....

but i dont see where to put in the Database object...

The Database it needs to connect to in SQl is called

The Server name is SQLSRV when you expand databases the database is called SWHSystem the Table is called dbo.Credential and from that i need to get SELECT All from the Name and CardNumber from dbo.Credential and put that in a New Sheet titled Personal

using Excel 2010 connecting to SQL 2008

View 4 Replies View Related

Excel 2010 :: VBA - Run Code Only When Clicking In Specific Cell?

Dec 23, 2013

how to run some VBA code (written by someone else, unfortunately) only when clicking once in cell A1, and not run in any other cell. This is being run in Excel 2010. The code I would like to run in this manner is below, and currently will run when the user clicks on any cell in the worksheet it is applied.

[
Option Explicit_________________________________________
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'If IsDate(Target.Cells(1, 1).Value) Then
Set DatePickerForm.Target = Target.Cells(1, 1)
DatePickerForm.Show vbModal
Cancel = True
'End If
End Sub
]

View 3 Replies View Related

Excel 2010 :: VBA Code That Handles Several Specific Parameters Or Wildcard Passed To Access

Jul 17, 2013

I would like to develop a user-friendly Excel 2010 spreadsheet that would allow the user to enter from 1 to 10 (i just picked this number at random just to have an upper limit) employee numbers in cells A1-A10 and "click" on the VBA Code button that would invoke an Access Query and in the process return all the applicable data gathered from the query back into the Excel Spreadsheet. Believe it or not, I can do all this mentioned so far. BUT what i cant do is my second option for the user which is allow them to pull ALL of the employees back into the spreadsheet using the same query.

In summary, using Excel as a frontend dashboard, I know how to get a specific number of employees' information from a query and I know how to get all employees' information from a query but I dont know how to get either/or. In other words, I could do this with two queries and two "VBA-Code" buttons but I would like to do it with one query and one button.

View 1 Replies View Related

Excel 2010 :: Macro Or VBA Code To Rearrange Data

Jul 5, 2012

I'm using Excel 2010 and XP. I have data in rows 1 -4 that can not be altered. There are headings in Row 5, B-L & Row 6, F-J.

Data starts in Row 7 and follows the headings. This repeats for several thousand rows. I need a way to move Row 6, F-J and put it on Row 5, M-Q

Row 6, F-J and put it on Row 5, M-Q
Row 8, F-J and put it on Row 7, M-Q
Row 10, F-J and put it on Row 9, M-Q
Row 12, F-J and put it on Row 11, M-Q
....
....
....

Then delete blank rows below Row 5

View 7 Replies View Related

Excel 2010 :: Add Code To A Macro To Calculate Something Depending On Months

Aug 22, 2012

I am looking for something to calculate values based on the past three months. I already have written a macro to retrieve all of the data and just need this as an add-on.

for example, lets say it is 5/31/2012. I have a row with dates going like

10/31/2010 11/31/2010 .........

I want the formula to calculate SUM(march+april+may row 68)/SUM(march+april+may row 59)

I have an input tab where I can select the month, say 5, and get the periods.

3/31/2012, 4/31/2012, 5/31/2012

if I changed the 5 to an 8 it would get 6/31/2012 7/31/2012 8/31/2012

I don't know if i need VBA for this but I am trying to have something to calculate this depending on the period selected in the input tab.

I am using excel 2010. I am thinking something with an offset function and maybe a loop? but still not sure.

View 2 Replies View Related

Excel 2010 :: Pull Value From One Workbook Into Another

Aug 6, 2014

Using Excel 2010. I have 2 worksheets, saved in same folder (if that matters).

Worksheet 1=Master_List.xlsx
Column1
Column2
Column3
Column4
PartNumber

1002
Sony
Playstation
4D
W74859

Worksheet 2=Sample_List.xlsx
Doesn't Matter
Doesn't Matter
Doesn't Matter
Doesn't Matter
Doesn't Matter
Column1
Column2
Column3
PartNumber

Doesn't Matter
Doesn't Matter
Doesn't Matter
Doesn't Matter
Doesn't Matter
1002
Sony
Playstation

Basically, I'm looking to populate the blank cells in the PartNumber column (Sample_List) by looking at the data in Column1, Column2, Column3 then going to the Master_List, matching up Column1, Column2, Column3. The PartNumber value in the row with the matching values would then be copied to the Sample_List.

View 4 Replies View Related

Excel 2010 :: Macro To Color Code Cells Based On Value In A Cell And Range In A Table

Dec 2, 2013

I am using Windows 7 and Excel 2010.

Is there a way to create a macro to color code a cell based on the value in a cell, and then look up a value in a table, then color code it based on where it fits into the table?

I have a table of values for about 30 projects. In column g - there is a CPI value (see bold column)

Example: Project ID
Name
Program
PMT
SI ID
AC
Milestone
TCP Level
[Code] ......

Here is the table:

I have to color code a cell, base on the CPI and how it fits into the table below. So if the current Milestone is M2 or M3 and the CPI calculated is .14 the cell would be colored RED, if the CPI number is 2.01 for M2-M3 I would want cell to be colored Turquiose. If we were at Milestone M6 and the CPI was 2.01, it would be colored blue. If the CPI was .75 at Milestone M5, it would be colored Green

LEGEND
Earned Value Limits

Milestone
RED
Yellow
Green
Turquoise
Blue

M2-M3
2.15

M4-M6
1.66

M7-M11
1.26

View 2 Replies View Related

Excel 2010 :: Freezes When Using Pull Function In INDEX / MATCH

Feb 14, 2014

I am using Excel 2010.

My objective is to pull specific values from an external file corresponding to the correct name and year of my choosing. The first way I thought would be best is to use an INDEX/MATCH function. The problem is the external files change names so I would need a method to easily change the source file name from one cell. I then stumbled across the INDIRECT function, but the INDIRECT function will only work when the source file is also opened. I then came across Harlan Grove's pull function which allows you to import data from closed excel files.

So, this is what my formula looks like: =INDEX(pull("'"&G12&"");MATCH(C15;pull("'"&G14&"");0);MATCH(D15;pull("'"&G16&"");0))

Cells G12,G14, and G16 contain the file paths for the ranges. C15 is name and D15 is year.

The problem I have though is that when I try to execute the function, Excel gets stuck. if the code cannot handle large amounts of data. I tested the code with a simple SUM function for a small range from an external file and it worked just fine.

This is the code I am using:

[Code] ...

View 3 Replies View Related

Excel 2010 :: Pull Quantity Based On Date Range

Oct 27, 2011

Using excel 2010

In cell U24 I have this formula:

=SUMPRODUCT(($E$3:$E$2000=51014)*($F$3:$F$2000=101)*($K$3:$K$2000))

Currently, as you can see, this is summing up the criteria specified from row 3 to row 2000...(which i made the last row 2000 becuase I will never exceed row 2000 with info)

What I am trying to do is in cell T22 and U22 be able to plug in date ranges and make the above formula give me the sums of thos date ranges.

For example in T22 put in 8-1-11 and in U22 put in 10-1-11, and have the sum of that date range populate in cell U24.

Now ther kicker is this: some dates are repeated so I may have six rows of date 8-3-11....and they will have to be part of the sum total.....and ALSO the dates are not in chrological order....I may have six rows of 8-3-11.......then four rows of 8-10-11.....then maybe another three rows of 8-3-11, and so on and so on...this is for all dates. Sorting the dates in order is not an option.

View 2 Replies View Related

Macro To Pull From Specific Sheets - Ignore Others

Mar 12, 2014

My workbook has several worksheets so do you need the name of those to be excluded? Or how many sheets i require which are located to the right of the summary tab?

Detail - 5 sheets to the left of summary tab are to be ingored, 7 to the right of the summary are to be pulled (let's say they're named Red, Green, Blue). I only want the colour named tab data pulled and pasted into the summary

Code is below :

Sub karryan()
Dim i As Long
For i = 1 To 3
Sheets(i).UsedRange.offset(1).Copy Sheets("Summary").Range("A" & Rows.count).End(3)(2)
Next i
End Sub

View 1 Replies View Related

Excel 2010 :: VBA Code To Extract HTML Source Code Not Working On Google Sites

Dec 6, 2012

I have previously used the following code to successfully pull out IE webpage source code for string manipulation.

Its a crude example to demonstrate the principle:

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public IE As Object
Sub Sample()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

[Code] ......

However when I substitute in a Google websites address into the IE.Navigate command, the code runs to the "Source_Code = IE.document ...." line then flags up a Microsoft Visual Basic error. "Run-time error '438': Object doesn't support this property or method"

The webpage that I am trying to access is a confidential company site, so you won't be able to access it yourself, but starts with [URL] ......

The one thing that I have noticed about this website is the Privacy Report icon in the lower right status window (Picture of an eye with a restricted symbol in front). I don't know whether this is the cause of my problem, or purely an incidental observation.

Is there something peculiar with Google sites that means that the source code cannot be extracted in general, or is this an issue specific to my site ? Does the Privacy Report icon have any relevance, and if so how do I switch that off ?

Using :
MS Excel 2010
IE Explorer 8.0

View 1 Replies View Related

Excel 2010 :: Set For Specific Worksheet

Jul 30, 2014

I am using lesson 33 of Excel VBA and Macros with Mr Excel as my guideline. The coding is as follows:

Dim WBO As Workbook 'original workbook
Dim WBN As Workbook 'individual data workbooks
Dim WSL As Worksheet 'List of files worksheet
Dim WSN As Worksheet

Set WBO = ThisWorkbook
Set WSL = WBO.Worksheets("List")
Set WSD = WBO.Worksheets("Data")

[Code] ......

I have indicated above with ( ) the beginning of my problem.

From the workbook with the list of workbooks to open, in each case I want to refer to a worksheet in each workbook
named "Report" and grab all the rows with data exept heading (rows 1 & 2) and 9 columns.

How do I get WSN in the code above to include the worksheet named "Report" or do I need different coding. Using Windows 7 & Excel 2010.

View 1 Replies View Related

Excel 2010 :: Compare Data In Five Sheets And Pull Out Missing Data

Oct 2, 2013

I have one excel 2010 workbook with 5 work sheets, each work sheet contains a list with first/last name(one column) and the company name, some have a 3rd column with their email address in each sheet represents each year starting at 2008 thru to 2013 i have to find out if the people that attended an event in 2008 also attended it in 2009/10/11/12/13 and if they didnt, put their name and company name onto a blank worksheet within the same workbook without using a macro, how can i do this?

View 2 Replies View Related

Excel 2010 :: Getting Outlook Warning (2010) While Sending Email Through Macro

Mar 25, 2014

I am trying to send bulk emails from my excel 2010 - however I am getting a POP UP. find the screen shot in the enclosed word document So every time a new mail is sent from excel we need to press the button allow Is there a way where I can turn off this warning.

View 6 Replies View Related

Excel 2010 :: Find Duplicates Within Specific Timeframe?

Jun 26, 2014

Is there a way to differentiate the number of unique and duplicate entries (considering multiple criterias) using a formula.

I am finding it hard to describe the request hence i have attached a spreadsheet for reference.

The first tab contains the data where I want the result in 'column J'
The second tab contains the metrics of how to calculate the result.

I am sure this will be difficult to understand at first hence feel free to ask as many questions you would like to [only related to the subject ]

For the record, I use Excel 2007 & 2010.

View 3 Replies View Related

Excel 2010 :: Sum Based On Criteria In Specific Column?

Oct 20, 2011

how can i sum base on the Criteria in Columns G, in this sample the sum should be 67.

Sheet1ABCDEFG1V. GoodGoodFairBadN/AReported29853N/A8Bad31085328N/A410953N/A8Good510853N/A8Good61085378Good77853N/A8V. Good810853N/A8Good910753N/A8Reported108853N/A8Good11585308N/A1210653N/A8Good1367Excel 2010Worksheet FormulasCellFormulaG13=67

View 9 Replies View Related

Excel 2010 :: Find And Replace Within Specific Column?

Oct 1, 2012

I have an excel workbook where some sheets have a column called "Name" in Row 3. The column where "Name" appears shifts based upon other criteria so it's not set within 1 specific column.

The real data for the "Name" column starts in Row 5. Is it possible to create a macro that looks in Row 3 for "Name", then once it finds that column, it does a find and replace from Row 5 to the end of the data and replaces every space with a ^.

For example, if I have:

Row 3 Name
Row 4
Row 5 John Smith
Row 6 Jane Doe
Row 7 John Doe
Row 8 Jane Smith

I'd like the data to become:

Row 3 Name
Row 4
Row 5 John^Smith
Row 6 Jane^Doe
Row 7 John^Doe
Row 8 Jane^Smith

I'm using Excel 2010 if that impacts anything.

View 1 Replies View Related

Excel 2010 :: Row Height And Column Width For Specific Range?

Jul 6, 2013

I have tried and been searching but cannot find the answer. Is it possible to change the row height and column width for only a selected range in my spread sheet, for example, F13:I23? I am using Excel 2010.

View 2 Replies View Related

Excel 2010 :: Copy Entire Row If Cell Contains Specific String

Apr 5, 2012

I am a total newb to excel and vb, and only have minimal experience in embedded C.

I have a very large spreadsheet with 9 columns and the max number of rows that excel supports (office 2010).

What I want to do is copy the entire row of data IF a cell in that row contains a specific string I'm interested in.

If it's necessary, the column that contains the values that would trigger a row copy would be column C and the data would be pasted onto a new sheet.

View 1 Replies View Related

Excel 2010 :: Save Sheet At Specific Times Daily?

Jun 18, 2012

I need excel 2010 to automatically save at 09:30 and 19:45 every day monday-friday. Also need the file name saved to reflect the time and date it was saved - if possible.

My PC locks after 10 minutes of inactivity - unfortunately this has to happen because of where my PC is situated.

View 1 Replies View Related

Excel 2010 :: Display Column If Single Cell Has Specific Value

Nov 27, 2012

I'm using Excel 2010 and I'm having troubles displaying hiding my column B if none of the cells of column A contains either "(Quasi Echec)" or "(Quasi Russite)" at least once.

PHP Code: [URL] ......

Below are my 3 attempts.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim c As Range
If Target.Column 1 Then Exit Sub
Application.EnableEvents = False
On Error Resume Next

[Code] ..........

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Sub GetUniquesInColA()
Dim rng As Range
Dim c
If Target.Column 1 Then Exit Sub
On Error Resume Next

[Code] .........

Code:
Option ExplicitPrivate Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As Long
Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row

[Code] ...........

View 2 Replies View Related

Excel 2010 :: Select Specific Cells In Filtered Data

Nov 1, 2013

How we can select specific cells in the filtered data using VBA in Excel 2010.

I need to select 10th column, 5th row data .. or 10th column, 6th row data .. or 13th column, 8th row data...

How to select this data using VBA.. I am struck here .. If I give the below code.. the hidden cells inbetween the filtered data is getting selected.. only the first row is getting selected correctly.. i.e, ..rnVisible(1, 2).Select .. If I change the row like rnVisible(2, 12).Select its selecting the hidden cells ..

Dim rnVisible As Range
Set rnVisible = ActiveSheet.Rows("2:10000").SpecialCells(xlCellTypeVisible)
rnVisible(2, 12).Select
MsgBox ActiveCell.Address

[Code ........

View 1 Replies View Related

Excel 2010 :: Moving Between Cells By Using TAB Or ENTER Key In Specific Order?

May 1, 2014

Have developed a form for my associates and want them to be able to move to the cellls I want them to fill data in to by merely hitting the TAB or ENTER key vs. having to move the cursor to each cell requiring them to input data.

Want cursor to move in a specific cell order. You would think you could merely say 1M, 2C, etc.

View 9 Replies View Related

Excel 2010 :: Hiding Rows In Pivot Table With Specific Value Range?

Jan 20, 2014

I am using a pivot table in excel 2010. 15 columns (fixed) and plenty of dive downs for rows.

I am trying to 'hide' all of the rows containing values less than 10. If it is easier we can start with hiding values of zero and go from there.

It is key to hide the rows as within the dive downs the rows within the pivot are to many to sort through. If there is a way to do this using the grand total columns for each row that would work as well. Just to be clear I need to hide the entire row not just report the empty cells as zeros. If any further detail is needed feel free to ask.

For example: If value of column O "Grand Total" = 0 'hide rows with value 0' ELSE 'display rows with value greater than 0'

View 4 Replies View Related

Excel 2010 :: Compare 2 Worksheets - Eliminate Those Falling Under Specific Criteria

Jul 2, 2012

I have 2 lists (excel 2010) that I need to compare (they are currently 2 files, but I can combine them into 1 file with 2 worksheets) if it would be better.

The first list is of "All Students" at our college. The second list is those students who live "ON campus". I need a list of those students who live OFF campus.

The common denominator headers in both lists is: A1 Last Name A2 First Name

I would like to keep the "All Students" list as my master as it contains all the data I need such as addresses.

Ideally, I would like to create a macro or lookup or whatever that will take everyone from the "ON" list and remove them from the "ALL" list, leaving me with the data I need.

View 4 Replies View Related

Excel 2010 :: Unhiding Specific Number Of Worksheets Based On Cell Value

Jun 26, 2013

I have been attempting to cobble together code from different forums for the past several hours to make a macro to unhide a specific number of worksheets based on a cell value, and have failed miserably thus far. Here are the specifics of what I have going on:

Microsoft Excel 2010
Workbook Name: TASERR Model - 06-26-13.xlsm

In this workbook, I have a worksheet called "Input". In cell C21 of that worksheet, workbook users will fill in a number between 1 and 50 (I have the value for that cell limited to those numbers through data validation). Based on the value in that cell (C21), I want to make a macro to unhide that specific number of hidden worksheets. I have 50 hidden worksheets which are named "Route (1)", "Route (2)", "Route (3)", etc.. If the value in cell C21 is 7, I want the worksheets named "Route (1)", "Route (2)", "Route (3)", "Route (4)", "Route (5)", "Route (6)", and "Route (7)" to unhide. If the value in cell C21 is 3, I want the worksheets named "Route (1)", "Route (2)", and "Route (3)" to unhide. I'm sure y'all can see the functionality I'm going for at this point.

View 8 Replies View Related

Excel 2010 :: Using Multiple Checkboxes To Hide And Show Specific Columns

May 12, 2014

Basically I have a big table containing several columns for the different quarters. (Each quarter has several columns which are not all next to each other)

I would like to use 4 checkboxes which the user can select the show or hide the columns for that quarter. E.g. if Q1 and Q3 are checked only those are visible)

(if quarter 1 clicked than all columns are visible if unclicked hidden).

The code I have written workes well for the first checkbox (Q1), but for the other quarters (Q2, Q3 and Q4) the columns get hidden when checked (which should be the other way round) and don't get unhidden when unchecked.

Sub CheckboxQone()
If Range("$A$1").Value = True Then
Call showQ1
Else: Range("$A$1").Value = False
Call hideQ1

[Code] ...........

View 2 Replies View Related

Excel 2010 :: SUMPRODUCT Answer To Return Blank When No Data In Specific Cells

May 12, 2013

I am using Excel 2010 and I am trying to average the amount of days in a month to a daily average per person in my worksheet.

Total sales per person
A5 = 10 - This is the Grand total per person for column A
A6 =4
A7=6

Daily average per person
C5=2.6 - Average for all persons here
C6=2.0
C7=3.0

The formula I am using is:

=(SUMPRODUCT($A$6:$A$15,C6:C15))/$A5

Which gives me an answer of 2.6 in cell C5 as shown above which is what I am wanting.

Please note that my cell range for my staff goes from 6-15 for both Column A and C where the other cells are blank in both columns.

My question is, If I was to clear all the data in both Columns A6:A15 and C:6:C15, cell C5 would return to a #VALUE. How to I change the formula so that if the cells were Blank, cell C5 would also be blank until I enter data for each person again?

View 2 Replies View Related

Excel 2010 :: Calendar - Set Up Specific Time Frame And Due Date To Exclude Weekends And Holidays

Apr 9, 2014

I'm using excel 2010 on a pc. I need to create a calender. So far I have been using the tutorial for the pop up calender. The result I'm looking for is to set up a specific time frame and have the calender provide the "due" date. I would like the due date to exclude weekends and holidays. Would I be able to do this with the pop up calender?

View 3 Replies View Related







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