Recursion (Quick Sort)

Jul 31, 2008

I've been having a play with sorting integers in A1:I1 (because that was the example in Wikipedia). I've got some code that kind of works, but the recursion is entirely manual.

(I know it's only a mickey mouse example, and no practical use!)

Sub quicksort()
Dim iPivotIndex As Integer, iPivotValue As Integer, iTempValue As Integer, iStoreIndex As Integer, i As Integer
Dim iStartNumber As Integer, iEndNumber As Integer

'how do I give it the original iStartNumber and iEndNumber
iStartNumber = InputBox("Start")
iEndNumber = InputBox("end")........................................

View 9 Replies


ADVERTISEMENT

Quick Way To Add Tabs

Feb 5, 2009

if there is a quick way to add any number of tabs to a spreadsheet.

ie one particular spreadsheet i need to have 32 sheets (tabs) but am getting seriously bored to right click insert worksheet time after time. there must be a quicker way?

View 6 Replies View Related

[VBA] Quick Copy / Paste

Jun 4, 2008

The goal of this code is to check between two sheets, if it finds a match between both sheets (somewhere in column A) then it should copy E,F,G columns from Sheet2 to Sheet1..

The Sub Test()

aLastRow = ActiveSheet.UsedRange.Rows.Count ' last row of active worksheet; assume master is active sheet .....

View 9 Replies View Related

Quick Auto-Numbering

May 4, 2009

Auto-Numbering

just an example:-

56
57
58
59
60

The Column above is the first column on a selected sheet.

i will select 56 and from there (End-Shift+Down arrow) which selects all the values from 56-60...

My question is from here on if there is a shortcut key or 'vba macro' that can autonumber from 1.

Thus giving output result of..

1
2
3
4
5

i want to record the solution for above problem in a macro recorder for different numbers that is why i have to do (End-Shift+Down arrow)

View 9 Replies View Related

Creating A Quick Label

Oct 13, 2009

I am doing a "Lost and found" spreadsheet project for a hotel.

Each row contains the lost items with all the necessary info in separate cells (Room nr, found by, reference nr, client name, etc)

Every item is being bagged and then a label is put on it. ( has the same information but its just arranged prperly. (Like a label )

What I would like to do is to have a column in each row that has a "print" button. What would happen is that the macro would create a label in sheet2, print it on the default printer and then erase everything on sheet2. (I am kind of new to macros so I dont even know if I need to use the sheet 2 for it).

I have already done a kind of a template for the label and set it up on sheet2. I would probably manage to get the print function working with the online tutorials(if not i'll be back) but can't figure out how to do the first bit of it.

View 9 Replies View Related

Quick Replace On Many Tabs

Feb 16, 2010

I have two spreadsheets, each with about 50-60 separate worksheets in them, and each spreadsheet has simarly named tabs. I am trying to replace the values in column Q on spreadsheet 2, and move them to column O on spreadsheet 1, on each worksheet.

Is there a way to do this quickly, or will I have to copy-paste many times over?

View 8 Replies View Related

Winzip - Quick Way To Zip Up Files From Different Path

Aug 27, 2009

I have a folder that contain a list of files in shortcut type. So that i can just click it without going to different drives and paths to open those files and it really save my time.

After updating those files, i need to zip it up. There are many files to zip up and it takes time by going to its path one by one. Do you guys know is there any method to zip up those files without going to its relevant drives and paths?

View 14 Replies View Related

Quick CSE Array Formula Entry

Feb 11, 2012

I wonder if there is a way to enter my formulas as an array formula using Control-Shift-Enter in a more time saving way than one line by one line

I have 600 rows of array formulas all in column E but at different intervals with some blank rows inbetween

The formulas are in place but just need the CSE to enable the array formula { }

I am not looking forward to line by line entry.

View 1 Replies View Related

Quick General Loop Optimization

Jul 31, 2012

Let me first quickly describe the workbook setup. I have a main workbook ("Fees") that acts as a master list for every employee's clients' account numbers. Every month, 30+ workbooks get downloaded from 3rd parties that have the client account numbers, as well as their current account value.

My macro- Loops through every employee's worksheet within the Fees workbook, and loops through every account number. It then compares the account to every account in every other open workbook. Upon a match, it pulls the account value back into the main workbook. After it finishes looping the Fees workbook, it starts to loop every open workbook, and checks every account value against every account in the Fees workbook. If it doesn't find a match, it prints the value on a Missed worksheet within the Fees workbook.

The situation- I know for a fact this a verrry slow way to go about what I need to accomplish. I am very new to writing code, and gladly can take the extra minutes to let the code execute to know 100% nothing was missed. Going forward, I would like to start trimming execution time without jeopardizing the 100% accuracy of my slow macro.

The question- Based on how I execute my loops, what is likely to trim the most time for the range lookups? I have no practical experience with Vlookup, but I understand that is a possibility I should look into. I'm vaguely familiar with Match, and arrays, and I believe they could also trim time. I also realize there are probably at least 15 other ways to go about it I am not even aware of.

View 9 Replies View Related

Quick Way To Remove Duplicate Values From A ROW

Sep 12, 2013

Is there a quick way to remove duplicate values from a ROW. The "Remove Duplicates" operation under the "Data" tab only works for a column selection and not a row selection.

One approach I am thinking about, is to transpose the row into a column, run "remove duplicates" and then transpose again into a row.

View 1 Replies View Related

Quick Re-format/add Rows Using MACRO

Feb 18, 2009

create a MACRO/module that will take teh above example rows 1 thru 6 to look like rows 9 thru 30. See below ....

View 9 Replies View Related

Quick Way To Find And Highlight Multiple Rows?

Feb 14, 2014

I have a very large spreadsheet (46,000 rows). There are a couple hundred rows I need to find and highlight, and also insert potentially-linked contract numbers in a second column.

For example:

Column 1: Column 2:
Contract # Linked Contract #
12345 67890

Is there a quick way to do this without using find and replace to highlight all several hundred of these rows? I have an hour and a half until I leave work and my boss wants it today! Compounded is the problem that there are about 100 versions of this spreadsheet I need to do this for.

View 12 Replies View Related

Quick Jump To Specific Worksheets Without Scrolling?

Apr 22, 2013

I have an Excel file that has over 50 different worksheets to track earnings from different sources in multiple categories. Each individual source has its own worksheet and I've grouped sources in the same category together and color coded the worksheet tabs so that all sheets in the same category have the same color.

The color coding visually see where one category begins and ends using the scroll bar, but is there a way to mark the first worksheet of each category and jump (or tab) to it instantly as opposed to scrolling?

For example, in the attached file, I am looking to quick jump to the following worksheets: AA, FF, GG, C, G, K, and U. Is that possible to do through any sort of bookmarking or is that a feature that doesn't exist in Excel?

View 2 Replies View Related

Search Within Range And Quick Jump To Column

May 17, 2013

I'm currently working with a largish file of about 300 columns and 40K+ rows.

1. To populate the cells, I have to find a match in column A first.define all of its entries as a range and make Excel's Find dialog box look for matches only within this range?Because right now I have to either constantly select column A before doing the search or move the cursor manually to the top cell before every search to prevent Excel from looking elsewhere... This is turning into a real drag. How to speed things up a bit?

2. After I've found a match in column A, I need to find the right column. All of them have a unique entry in the second row (B2, C2, etc.). The huge problem is there's a c..p load of these columns and identifiers aren't arranged according to any recognizable pattern. So, every time I have to do another search on row 2 to find the column I need. All of this is mind-numbingly, excruciatingly slow.

View 5 Replies View Related

VBA Formula Instead Of Countif And OR / AND To Get Quick And Light File

May 28, 2014

I attached herewith a file filled with Countif, sum, or, and. I look for a VBA to get lighter file. Because the file in fact will be filled up to 40,000 rows.

View 7 Replies View Related

Quick Code For Calculating Output Hours?

Jul 23, 2014

I have months ( 1 to 12 ). Every month, a set of tasks need to be executed which takes "x" number of hours.

So if I have 1 machine working 3 hour in the month 1, the total time spent is 3 hours. Fairly simple right !

Say on month 2, a set of tasks take 4 hours. total time that my first machine takes is 4 hours. But i want to introduce 3 new machines in this month, which will execute the first month's tasks. So total time spent here is ( 3*3 + 4*1) = 13 On month 3, task time is 6 hours. And I am introducing 2 new machines.

So total time is 2*3 ( time taken for 2 new machines to perform first month's tasks ) + 3 * 4 ( 3 new machines introduced last month will now execute second months task) + 6 * 1 ( time the first machine will spend on month 3 s tasks ) = 24

View 2 Replies View Related

Quick Code For (If Target Cell Is In Particular Column)

Jun 17, 2012

I would like to add one more "And" to the code below: If Target is in Column M

[code] If Target "" And Range("B1") = 1 Then[/code)

View 3 Replies View Related

Quick Time Formatting - How To Get Colon In The Middle

Nov 8, 2012

ColB is a time of day in 4 digits ****

I need it to be **:**

How do I get the colon in the middle?

View 1 Replies View Related

Invoking Procedure From Quick Action Toolbar?

May 16, 2013

I've developed a fairly simple procedure which lets me reformat cell backgrounds in a worksheet after various cut/paste operations.I've created a template called BASIC.XLTM which has this code in it. I've added a button to the QAT to enable me to invoke the procedure, but when I click the button to do the reformat, it works for the active sheet, but it also invokes another instance of BASIC.XLTM.

View 2 Replies View Related

Search Within Range And Quick Jump To Column

May 17, 2013

I'm currently working with a largish file of about 300 columns and 40K+ rows. So two questions:

1. To populate the cells, I have to find a match in column A first.

Is there a way to define all of its entries as a range and make Excel's Find dialog box look for matches only within this range?

Because right now I have to either constantly select column A before doing the search or move the cursor manually to the top cell before every search to prevent Excel from looking elsewhere... This is turning into a real drag.

2. After I've found a match in column A, I need to find the right column. All of them have a unique entry in the second row (B2, C2, etc.). The huge problem is there's a c..p load of these columns and identifiers aren't arranged according to any recognizable pattern. So, every time I have to do another search on row 2 to find the column I need. All of this is mind-numbingly, excruciatingly slow...

Is there a way to make Excel jump to a specific column based on a value in a specific cell (in this case, B2-....MO2). Like maybe creating a form with buttons or checkboxes, so that whenever the right box is checked the focus would move to that column and to the row where the Find dialog just found a match in column A. Only I've never had anything to do with programming, so wouldn't even know where to start with this...

View 2 Replies View Related

Create Quick Link To Combine Data

Mar 17, 2014

I downloaded a spreadsheet with multiple same names such as

Name Week ending Days off
John Smith 1/31 2
John Smith 2/7 1
John Smith 2/7 3
Peter Sun 1/31 1
Peter Sun 2/7 2
Andy Mann 3/14 3

If I want to sum these up by name, what's the best way to do that?

View 9 Replies View Related

Excel 2010 :: Icons For Quick Access Toolbar

Oct 24, 2013

I've created some macros in Excel 2010 which I've added to the Quick Access Toolbar and want to show them using some of my own icons rather than the ones that show when you click the 'Browse' button. There is no option to navigate to any other location.

Is it possible to access icons other than the set provided?

View 2 Replies View Related

Excel 2007 :: Icons On Quick Access Toolbar

Jun 5, 2007

When adding functions to the quick access toolbars in Excel 2007 sometime they do not have an associated icon with the function. The icon shows as a green circle. How to change the icons and also to have a selection of icons like you have had in previous versions of Excel?

View 5 Replies View Related

Using Keyboard Shortcut To Quick Fill Down Row For Active List?

Jan 12, 2012

Is there a way to use a keyboard shortcut to quick fill down the row for a active list ?

Since the list keeps changing

I need it for a Macro , here is a sample

Item #Length270889931979=LEN(A2)180787908553330666384871330669608284250967244984180793288182, 180792627837130624794197, 130624797531260933577667, 260933529286140676813967380400523014380400518679380400522138400268527381260928469801400268072227, 400268076458190623879469

View 3 Replies View Related

Excel 2010 :: Quick Remove Spaces Macro?

Oct 29, 2012

I'm working on a sheet with about 10,000 rows and 8 columns worth of data. Most of them are formatted as 12345,12345,12345,23456 how they are supposed to be, but some of them will have spaces inbetween each sequence, or some even a couple spaces, or spaces at the end. For the most part I can use the replacement function with ", " to "," but some of the double spaces throw it off, and end spaces also. Is there a macro that can just search through the selected cells I pick to just remove all spaces so the data falls back onto the commas?

Working in excel 2010

View 7 Replies View Related

Macro Button On Quick Access Toolbar Disappears

Apr 15, 2014

I have written a macro. The macro in question simply shows a user form. There is far more code within the user form itself. It is designed to automatically format a workbook.

I saved the macro as an .xlam add-in file to the default folder. I then added a button for the macro to my Quick Access Toolbar. This seemed to work great.

However, when I open a new file that I want to run the macro on, the button disappears. In fact, a 2nd Excel window opens up on my task bar. The original window still has the macro button, but the new window does not.

View 5 Replies View Related

Ribbon And Quick Access Buttons Not Executing Macros Assigned To Them

Jun 6, 2013

I noticed that my custom "Close without Saving" button stopped working. I checked the VBA editor and my Personal workbook was missing and all of my personal macros were gone. I restarted excel, same issue. Rebooted my machine and they re-appeared. Not sure how what happened, but at least the Personal workbook was not lost. I'm working off my company's network, so often I get the "Personal Workbook is locked for editing" message. I usually select the open as read-only file and go about my merry way. Perhaps I clicked something different on accident without paying attention.

Anyway, I digress, the custom macro button that I had in my ribbon still didn't work, so I removed it and tried again in both the ribbon and the quick access toolbar with no success. The Macro executes if I execute it manually or via the keyboard shortcut, but the ribbon/quick access toolbar buttons won't work. Frustrating, because I use this quite often. I've even tried writing a quick "dummy" macro to see if it was some sort of code error related to the macro, but got the same result. My "Close without saving" code is below (super basic code).

Sub Close_Without_Saving()'' Close_Without_Saving Macro' Closes active workbook without saving changes.'' Keyboard Shortcut: Ctrl+q' ActiveWorkbook.Close (False)End Sub

View 1 Replies View Related

Quick Access Toolbar Command - Paste Values / Transpose

Mar 11, 2014

I would like to create/use a copy command in the Quick Access Toolbar that combines Paste Values and Transpose into a single command. Have tried recording a macro but it becomes specific to the individual workbook that I'm accessing and it copies the formula from that last cell that I copied from. Problem is that I have 19 workbooks to deal with and would like to save some keystrokes.

View 4 Replies View Related

Excel 2010 :: Installing Dropdown Menu Straight Onto Quick Access Toolbar?

Jan 31, 2012

Is it possible to install a dropdown menu straight onto the Quick Access Toolbar in 2010?

Tried

Code:

Application.CommandBars("Quick Access toolbar")

To reference it, but no joy.

View 3 Replies View Related

Repetitive Concatenation: Include At The Bottom Of The Email Addresses A Quick Copy And Paste Distribution List

Feb 3, 2010

I am getting ready to create a spreadsheet to list vendor's names and emails along with other data. I would like to include at the bottom of the email addresses a quick copy and paste distribution list. I have achieved this in the past by using a similar formula:

View 4 Replies View Related







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