Extraction Sample Of Emails From A Sheet Proportionate To The Original

Nov 10, 2009

I have been set a task to do and I wonder if you could point me in the right direction.

Task - extract 2000 emails from a 6000 email database

The 2000 emails have to be proportionate to the original database.

e.g.

The main database has the emails plus town and employee size ranges

Column A - Emails Column B - Town Column C - Employees

So if Column B states that 50% of the entire database is from one town, then my extracted emails must also have half from that town (1000).

Also there are around 5 employee ranges and so they need to also be proportionate to those percentages too in the final extraction.

View 10 Replies


ADVERTISEMENT

List Box- Sheet With The Following Sample Data On It

Dec 5, 2009

I have an excel sheet with the following sample data on it.

Name Age Sex Height
Ray 33 M 5' 8''
Sind 29 F 5'4''
Ralph 3 M 2' 1"
Ryan 1 M 1' 2"

I have managed to extract this info onto a form named Form1 which has 4 list boxes in which the above info is displayed in the same format.

To be more precise

Listbox1 shows all the Names,
Listbox2 shows Age
List box3 shows Sex and
Listbox4 shows height respectively.

What i want to do is, When i select an item on Listbox1, all corresponding enteries on Listbox2, 3 and 4 should also be simultaneously highlighted,

For example if I select the third data Ralph on the ListBox1, then ListBox2 should highlight 3,
Listbox3 should highlight M and
Listbox4 should highlight 2' 1" simultaneously.

View 9 Replies View Related

Random Sample Out Rows Of Data From A Sheet

Oct 4, 2009

I've coded a macro that can randomly sample out rows of data from a sheet. This macro is used to sample out certain rows from a master sheet full of data (which has 48 columns) based on user names (a column titled LAST_UPDATE_NAME). For Example (ref. wkb attached), if for 5 users named Alastor, Catherine, Emma, Julie and Victor for whom i've to choose data from the Dump sheet.

I need to design a module in which if i input the no. of samples to be chosen against each name, then that many number of rows has to be chosen for that particular name and copied to a new sheet (probably such sheets can be renamed with the usernames). Also i want to consolidate the copied data from the multiple sheets and consolidate them to one sheet.

View 4 Replies View Related

Matching Emails From One Sheet To Unique Identifiers In Another Sheet?

Jun 12, 2013

Sheet 1 has a list of unique ID numbers for several people. Sheet 2 is a master list of unique numbers for the entire population plus emails. Can i use a formula in sheet 1 to match the emails from sheet 2 to the unique id numbers in sheet 1?

View 6 Replies View Related

Script Not Copying Data From Emails Sheet To New Sheet

Jun 8, 2014

I am currently working on a script that will copy some data from one sheet to another, but I keep getting the following error message:

Run time error: Object required
at
Set uRng = .Range("F1", .Range("F" & .Rows.Count).End(xlUp))

What could be causing it?

View 3 Replies View Related

Sheet Name Extraction

Jul 6, 2009

can anybody tell me how the get the name of a sheet as a string?

i have a formula using the name of a sheet and i dont want to leave it hardcoded.

ex:

=IF(ISERROR(MATCH(_02.07.2009!B6;(OFFSET(_01.07.2009!$B$5;0;0;COUNTA(_01.07.2009!$B:$B)-1;1));0));1;0)

i need that dates as variables. those are the names of the sheets im using.

View 10 Replies View Related

Formula: Return Pro Rata (proportionate) Value

Sep 29, 2006

i have the following table and am trying to work out the formula to put in column C to pro rata the value of cell A1 against the values in column B1:5 so it appears as i've shown below.........

View 2 Replies View Related

Outlook Emails To Excel Sheet?

Mar 6, 2014

I have the need to convert regular emails to a excel sheet,

The emails are always sent from the same email address, and will have the same format ( however can contain small or large amounts of data eg 1 part number or 50 ).

sample email below

" PowerForce v4.00
Report : INR3050 v4.5
Title : EDI PURCHASE ORDER INBOUND ERROR EXCEPTION REPORT
For : ch3inl
Date : 05-Mar-14 06:06

[code]....

View 1 Replies View Related

Running Userform From More Than One Sheet And Return To Original Sheet

Dec 12, 2012

I've got a User Form that works perfectly. It's activated on Chart Month sheet, you enter data into it and it switches to Comments sheet and copies the data, before returning back to the Chart Month sheet.

I have now added the same functionality to Chart Week sheet. Both Chart sheets use the same comments data, so it doesn't matter if you run the User Form from Chart Month or Chart Week. However, when I run the User Form from Chart Week then it switches to the Chart Month sheet once it copies the data, as I have Chart Month in the code. How do I get it to return to the sheet that it was originally on ie either Chart Week or Chart Month?

Code:
Private Sub CommandButton1_Click()
Dim emptyRow As Long

'Make Sheet30 Active
Sheets("Comments").Activate

'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("D:D")) + 1

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

View 4 Replies View Related

Looking Up Value In Second Sheet And Returning Multiple Values To Original Sheet

Mar 11, 2013

Possible to look up a value from one excel sheet in another sheet and then return multiple values in the first sheet

For example the following is a sample of sheet 1

NSV Code
Item

12
OLANZAPINE

54
ROPINIROLE

And the following a sample of sheet 2 :

Nsvcode
Item
Division
Speciality
Qty

12
OLANZAPINE
CLINICAL
CS
10

[Code] .....

I want to lookUp the NSVCode from sheet 1 in sheet 2 and return the speciality and qty values in sheet 1 as sheet 2 contains a lot of info I do not require and sheet one also contains various pricing calculations I also require.

View 7 Replies View Related

Multiple Emails From Single Sheet Based On Data

May 3, 2007

I have an excel file having different columns. The test data is as under

Email HQ City Product Value
S@y.com XYZ BAC abc 10
S@y.com XYZ CAD bcd 20
S@y.com XYZ BAC abc 10
S@y.com XYZ CAD bcd 20
A@b.com XYZ BAC abc 10
A@b.com XYZ CAD bcd 20
A@b.com XYZ BAC abc 10
A@b.com XYZ CAD bcd 20

The above is sample data and the rows will change depending on data.
Based on email id the range should be picked up and the email should be send as a attchment.

View 9 Replies View Related

Highlight Entire Row When Cell Selected Without Losing Original Formats And Color Of Original Row

Sep 5, 2012

The problem is when I highlight a row with some color the original color of the row is gone, so I tried this code, and again, it's removing the original format and color for the row This is the code from McGimpsey & Associates : Excel : Highlight row with background colors

Code:
PrivateSub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Const cnNUMCOLS AsLong=256
Const cnHIGHLIGHTCOLOR AsLong=36'default lt. yellow
Static rOld As Range
Static nColorIndices(1To cnNUMCOLS)AsLong
Dim i AsLong
IfNot rOld IsNothingThen'Restore color indices

[code].....

How can I retain the range's historical color so that when I deselect the row it reverts properly?

View 4 Replies View Related

Excel 2007 :: How To Automate Emails And Invoices From Data Sheet

Apr 18, 2010

I have the office 2007 Suite.I have a small business, where i sell online mostly. I'm creating a simple spreadsheet using Excel 2007, a workbook that has simple financial statements.

I'm creating a list of customers along with what they order, what they paid, how they paid, (paypal, cheque) etc, The first column is the invoice number, and each is unique to each customer. I add as i get orders. so my list of invoices has the following fields as column headers

Quote:

Invoice Number Customer Name, Paid by Paypal, Paid by Cheque, Amount, Cusotmer email, Customer address, There are more and i won't list them all. Now each time i send an order, i have to fill in the excel worksheet. I then create the invoice separately in Word 2007 which i print to send to the customer with the order in the mail. The third step is sending an email to the customer upon despatch, using Outlook 2007.

I don't want to use accounting software as that is too complicated for my simple little business. What i do want to do however is combine all three tasks instead of having to open different programs and copying and pasting between them. I'd like to be able to add the data to Excel either using a form (ideally) or direct, then i'd like to be able to click on the "customer email" field to send a confirmation email to the customer, and also to be able to have an automated invoice, either in excel or Word, which draws the information automatically for each invoice, so that i only have to print it.

At the moment i'm doing all 3 tasks separately, when i know they can be automated.

1. I have about 20 columns of data for each invoice, ideally i'd like to be able to enter them from a form as it gets cumbersome going through them all in Excel. The form could be either in Word or Excel, which would be easier?

2. Using the invoice number as the unique field, how can i create an invoice that would draw out the required fields from the Excel data automatically, just by clicking a button? I dont' mind using either Excel or Word, whichever is easier, and i do have Access too, but i don't know if i should use that, or not. I don't need to draw any other data. I only want to print invoices and send confirmation emails.

3. After printing the invoice and posting the order to the customer i sent them an email confirming. Again i have to manually enter or copy and paste data in the email, which i know could be automated, if i create a template, and have some fields that are automaitcally populated using the fields in the date already entered.

These fields ususally include the total paid, currency paid, address, name and how many ordered. All of this could be automated, but i'm not sure how to do it.

View 9 Replies View Related

Cut And Paste (row On The Original Sheet Shrinked)

Sep 18, 2009

When i cut a row and paste it to another sheet, that row on the original sheet is shrinked. I don't know if my vba code has something to do with that
so just in case will put it here:

View 2 Replies View Related

Vb Return To Original Sheet To Paste

May 1, 2008

If I ask in a macro to open sheet containing a fax header, copy it, then how do I tell Vb to return to the original sheet to paste. There many sheets that require this from a button click on the sheet and instead of storing the graphic in all sheets I just want 1 copy so file closes faster. I would normally just name the original sheet, but this will change with every sheet.

View 13 Replies View Related

How To Copy Sheet And Place After Original

Oct 15, 2012

I need to copy the sheet being worked on, and place it behind the original sheet.

This is going to be in a Macro enabled template that other users will be rename when they save it.

It will be activated by a button on the original worksheet other users may need to rename the worksheet before copying so I am using ActiveSheet.Copy I don't want to put the sheet after a counted sheet, because other sheets may be inserted before the one being worked on. I am not proficient at VB, I basically search for a macro that does what I need and copy it.

This is what I am working on.

Sub CopySSR()
'
' CopySSR Macro
'
'
ActiveSheet.Copy After:=Sheets(7)
End Sub

View 2 Replies View Related

How To Return To Original Sheet The Name Varies

Oct 2, 2008

I need to know how to select the sheet the user was on at the time they ran the macro. The macro has to select (because I'm not yet smart enough to avoid all the selecting...) cells on other sheets, but I want to return to the sheet they started from at the end of the macro.

Unfortunately, they create these sheets themselves, and I have no idea what they will be named, or where they will be, or what their code numbers will be. They could delete them at any time and rearrange.

Sorry if this is a really dumb question. I suspect it is, but I can't find out how to fix it, and most people are smart enough to avoid the selects so I suspect it isn't an issue for them.

View 9 Replies View Related

Return To Original Sheet After Print Array

Jun 14, 2006

The code prints a series of sheets. Afterwards these sheets are "group"ed together. The code can be accessed from 2 different sheets. I need to figure out how to get rid of the grouping and return to the original sheet.

Private Sub CommandButton1_Click()
Sheets( Array("Pipe", "Pipe Flow")).PrintOut
UserForm1.Hide
End Sub

View 2 Replies View Related

Copy Sheet To Same Workbook Without Overwriting Original

Aug 11, 2007

I have some code written to duplicate a template and rename the copy to "Working Copy".

But if I run the code more than once, it breaks as VBA tries to overwrite the sheet with the same name.

Would I would like is for the macro to check to see it already exists and duplicate the copy with some type of incremental integer. Thus the first duplicate would be Working Copy 1, and if the macro is run again, the duplicated copy would be Working Copy 2, etc.

here is what I have so far:

Sub SCButton()
Dim i As Integer 'for making Working Copy 1, 2, etc.

Sheets("SCTemplate").Select 'this file will eventually be hidden and thus the user with only see the wokring copies.
Sheets("SCTemplate").Copy After:=Sheets(4)
Sheets("SCTemplate (2)").Select
'some sort of If statement here to check for the sheets

Sheets("SCTemplate (2)").Name = "Calculation"

View 5 Replies View Related

Macro To Save Sheet With Same Page Breaks As Original

May 14, 2009

I am trying to sort a macro out to save my sheet the same as the original when the button is clicked. When i try it from one location it is fine but from another location i get a print error, the error says prit quality is not right, when i debug it highlights: Print Quality = 600 I have tried changing it but keep getting the same error. Their maybe an easier way to do this but not being very good on VB i dont know what to do. This file is on a server and will be accessed from different locations.

View 2 Replies View Related

Create Copy Of Active Sheet & Convert Original To Values Only

Feb 11, 2009

I need to copy the Selected Sheet (Sheet name will be different each month) on a spreadsheet and paste the copy to the left of the selected Sheet. Then I need to copy and paste values the entire sheet of the sheet that the copy was made from (the one on the right). I am very new to macros, and I tried recording and manually editing the macro with no success. The number of sheets will be different always as I will be adding this to different workbooks and also because new sheets may be added to any workbook at any time. I attached my code that I came up with, as I am not familiar with code enought to "[code]" my code.

View 3 Replies View Related

Data Extraction (pull The Data To Another Sheet For Each Line)

Feb 23, 2010

I want to pull data from another sheet, however there are multiple listings of each and I want to pull the data to another sheet for each line. I maybe easier if I try and show below:

Col. ACol. BCol. C
Smith101
Jones512
Green65
Black1214
Smith 3612
Jones1512
Dual25
Green1225

I want to pull this data for each name in Col. A in to another sheet. I've tried "IF", "Vlookup" and a couple of others, it just seems to be hitting the first option and pulling the data but not the ones below.

So if I selected Green on the second tab it brings through the "6" and "5", but not informtion from the listing from Green below. So I wiould like to list all the Green's, and the applicable data.

View 4 Replies View Related

Search To Find Matching Cells And Copy/transpose Adjacent Data To Original Sheet?

Nov 12, 2009

I'm trying to find a way to search a second sheet in a workbook for specific criteria outlined in a first sheet (in my attached example, from A3 downwards within the 'list of search criteria' sheet), and then to copy any secondary data found against a successful search match to the original sheet, transposed against its corresponding matched search term.

As you can see in the example, the search term 'bindi' (A4 in the 'list of search criteria' sheet) appears in the 'data' sheet 3 times - the secondary data for these occurences ('feathery', 'Fibonacci', 'glassy') is copied to the 'bindi' row on the first sheet and is offset with each copy to produce a transposed-esque effect of copy and paste.

If it's any help, there are a maximum of 9 matches for a single search term in the real document.

Thanks in advance for your help... I tried to adapt a previous solution given to me for a similar question but failed miserably. I bow humbly to your expertise!

View 9 Replies View Related

SaveAs - Copy Sheet Into New Workbook And Save It In Same Folder As Original Workbook

Jun 17, 2014

I have been trying to edit a code which previously saved a copy in a new workbook to a specific folder/path. (Additionally it copies and clears some figures, but this is working as it should.)

However I would like the copy to be saved at the same location as the original workbook, regardless of the path the original workbook is saved.

I.e if I need to move the workbook containing the code to a new folder/location, when using the macro, the new copy should be stored in the same folder/location as the original one.

For now it is only saving the copy into "My Documents"

Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 16-02-2009 by ceng
'

Sheets("Bunker ROB").Select
Sheets("Bunker ROB").Copy
ActiveWorkbook.SaveAs Filename:= _
ActiveWorkbook.Path & Range("D3"), _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False

[Code] ........

View 2 Replies View Related

How To Return To "original" Sheet After Using A Link To A Other Sheets?

Jun 17, 2008

I have a workbook with about 200 sheets.
Each sheet contains lots of links to the other sheets, so the user can clink the link and then go to the new sheet.

But, how do I make a "return-function"? That can return the user to the sheet that was active before the link was followed? If possible I would like this do be doable for 5-10 sheets back.

This "return-function" is gonna be used by clicking a button on a floating toolbar I have connected to the sheet.

View 9 Replies View Related

Pull Random Sample

Oct 10, 2007

I want to pull a sample of 15 numbers from column A, the catch is that the contents of column B cannot match once the sample is pulled. How do I do this.

View 9 Replies View Related

Insert Sample Mean Symbol In Excel?

Mar 3, 2009

How to insert the sample mean symbol, so that the "bar" is centered over x?

View 5 Replies View Related

Excel 2007 :: Differentiate Between Sample IDs

Apr 24, 2013

I am working in excel 2007. I have been using the COUNTIFS function to pull out some summary stats from my data. For my data I have sample ID's which are a letter followed by a number e.g. A12, A20, A39, A50. I have 40 columns of variables I am looking at which for each sample ID have either a value of 0 or a numerical number. For each column, I want to count firstly any samples that are greater than 0 (i.e. they have a numerical value) AND if the sample ID differs. This is because I have multiple samples per ID and so I want to know how many different ID's have a numerical value.

Is this at all possible in Excel? I do not know all of the functions very well, so I cannot find anything that will allow me to look at differences in the samples ID.

View 2 Replies View Related

Average Formula When Sample Size Changes

Jan 17, 2008

I am computing the average of anywhere from 5-10 numbers. When the numbers are not inserted there is nothing left in the cell. The problem is I get a value that is close to the average but not the real average. (Also the cells I am using are N37:Q41 for the first 5 samples which is constant the next 5 are not always constant W37:Z41) Here is the formula I am using:

=IF((W37="")+(W38="")+(W39="")+(W40="")+(W41=""),AVERAGE(N37:Q41),IF((W38="")+(W39="")+(W40="")+(W41=""),AVERAGE(N37:Q41,W37),IF((W39="")+(W40="")+(W41=""),AVERAGE(N37:Q41,W37:Z38),IF((W40="")+(W41=""),AVERAGE(N37:Q41,W37:Z39),IF(W41="",AVERAGE(N37:Q41,W37:Z40),AVERAGE(N37:Q41,W37:Z41))))))

I have the same problem with a standard deviation formula and the same group of numbers (I get something close but a few points off).

=IF((W37="")+(W38="")+(W39="")+(W40="")+(W41=""),STDEV(N37:Q41),IF((W38="")+(W39="")+(W40="")+(W41=""),STDEV(N37:Q41,W37),IF((W39="")+(W40="")+(W41=""),STDEV(N37:Q41,W37:Z38),IF((W40="")+(W41=""),STDEV(N37:Q41,W37:Z39),IF(W41="",STDEV(N37:Q41,W37:Z40),STDEV(N37:Q41,W37:Z41))))))

View 9 Replies View Related

Calculate A Sample Size Using The Population

Apr 16, 2009

How you do use excel to calculate a sample size using the population, error limit, confidence level and upper error limit rates?

View 9 Replies View Related







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