Macro To Format The Auto-Sum Row Without Knowing What Row# It Will Be

Mar 20, 2009

I currently have a macro setup that puts Auto-Sum data in the row below the bottom-most row of data. What code would I need to format this Auto-Sum row with the following parameters automatically...

1. Merge & center F & G in the Auto-Sum row with the text "Totals".
2. Change the row height of the Auto-Sum row to 44 pixels.
3. Center the vertical alignment of the Auto-Sum row.
4. Put the thickest border around the Auto-Sum row in cells A-K.

View 14 Replies


ADVERTISEMENT

Macro Knowing Currently Opened Sheet

Mar 19, 2007

below you will see my macro. I have a slight problem, everything works perfect, except when I change file names. Basically I keep an electronic backup every day of the file I create. So today's file will be named DOH031907, tomorrow DOH032007, Wednesday DOH 032107, etc. etc. I use the same sheet, including the same Macro every day so it does the same thing. Basically everywhere you see "DOH031907Test.xls" I want it to put the current workbook file name there. I'm new to this kind of stuff but it seems like there is an easy solution.

Sub DOHComplete()
'
' DOHComplete Macro
'
' Keyboard Shortcut: Ctrl+Shift+T
'
ChDir "K:PICDailyMetrics"
Workbooks.Open Filename:="K:PICDailyMetricsGMDEMAND2.XLS"
Windows("DOH031907Test.xls").Activate
Sheets("EDI Demand").Select
ActiveWindow.SelectedSheets.Delete
Windows("GMDEMAND2.XLS").Activate
Sheets("EDI Demand").Select
Sheets("EDI Demand").Copy Before:=Workbooks("DOH031907Test.xls").Sheets(3)

Added Code tags - Moderator

View 9 Replies View Related

Macro To Auto-populate Date And Time In Text Format

Jun 7, 2012

I think there's a way to use Excel to automatically create a 5-day calendar. Maybe a macro?

The date format must be dd/mm/yyyy hh:mm and it must be in text format. If its June 9, 2012 at 6pm - the correct format is: 12/06/2012 18:00

I want to post 5 times a day: 09:05, 9:55, 10:45, 16:55 and 18:00.

Column A is where the date and time goes. Ideally, I'd enter in A1 the start date and then run a macro that would automatically populate the next 5 consecutive days with the specific times above (so 25 rows total in column A).

I have to save the file as a csv file, so the date and time format has to be in text or I'll get an upload error in Hootsuite.

View 1 Replies View Related

Copy Down Formula Macro Without Knowing How Many Rows To Copy Down

Feb 18, 2008

I have a macro that inserts a formula on the first row and then copies it down. The problem is the row count is variable but I know it won't exceed 5000 so I just copy it down 5000. For the blank rows I get the ugly #NAME, #VALUE, etc errors.

I know there are ways to supress those error messages, but how about a way so that the macro checks to see how many rows are populated so it doesn't copy down on the blank rows.

View 9 Replies View Related

Naming New Tab Without Knowing Its Name

Feb 16, 2012

Is there a way to name a new tab without knowing its name. For instance, when I create a new tab, it could be named "Sheet2" or "Sheet3", but there is sometimes no way to know. Is there a way to edit the name of that new tab without refering to it by name?

View 1 Replies View Related

Knowing The Exact Datas

Feb 19, 2010

My date of birth is 09/08/1970.I want to know that as on today,which years,months and days I have passed?

View 3 Replies View Related

Reference Workbook Without Knowing Name

Jun 26, 2007

I have a master workbook, meeting1.xls which is used on a daily basis. All of the macros saved in this workbook naturally refer to Windows("Meeting1.xls").Activate.

However, I want to be able to open Meeting1.xls save it as a new name (for today's details) and then populate it.....as well as have the Macros pick up that new file name (rather than always looking for Meeting1.xls.)

I've tried saving Meeting1 as a template file and that didn't seem to work either. When I save it as a new name, the macro always searches for the original name.

View 9 Replies View Related

Knowing The Worksheet Number Or Letter

Apr 5, 2007

Without using VBA code, is there a way to display or find the worksheet number of the active worksheet you are viewing? All my sheets have names, and I have a lot of them.

When I want to loop through a set of them with code, I want to know what numbers they are beforehand.

View 9 Replies View Related

Deleting Sheets Without Knowing The Names

Jan 19, 2009

Is it possible for a macro to delete any sheet that within a workbook that does not match a specific list of sheets. For example a workbook will always have Sheet1, Sheet2, Sheet3, Sheet4... but it can have many other sheets added to it. The names of the sheets can be completely different however the sheets that I want to keep will always have the same name.

View 9 Replies View Related

Serialize A Variable Without Knowing How Many Instances Are Required?

Sep 29, 2009

I'm sure there's a way to do this, I just haven't put my finger on HOW just yet. I have a list of stock tickers which can vary from 1 to say, 10. I need to use each of those 10 tickers in the subject line of a message. I thought I could do something with SPLIT, but that's not working for me. Here's what I have so far: u = the count of tickers. Column O contains the list of unique tickers

View 4 Replies View Related

Formula Rectified And I Find Myself Not Knowing How It Works

Mar 20, 2007

I have a nifty formula brought to me by one of the excellent members on this board. It works perfectly for what I want, but I must admit I cheated, I have a problem that was similar to the problem this formula rectified and I find myself not knowing how it works.

=IF('IIC Transfer Status'!O139="x",MIN('IIC Transfer Status'!K139+10-WEEKDAY('IIC Transfer Status'!K139-{1,3})), "" )

What Im wondering is if someone could enlighten me as to what is happening in this function, so Im not as blind to assume it is magic.

Eventually I need it to be customed tailored to work in this way: I have a column of dates, I want it to look at column A and if there is a date in it ADD 4 WEEKDAYS (business days) and return the resulting date.

i.e date in column a is march 19 plus 4 business days. Result in column B march 23.

If someone can explain how this string works that would be great, or if someone could just post a suitable function, that would work for now.

View 9 Replies View Related

File Download Without Knowing The Full Url (only Indirect Url Available)

Aug 13, 2008

have a link such as www.abc.se/downloadfile?file=12345. When opening this link in a browser the DownloadFile window popups and the file can be downloaded.

I would like to be able to download the file without involving the DownloadFile pop up (since some users have auto open enabled thus the downloadfile pop-up is not always shown)

I have tried URLDownloadToCacheFile and similiar methods but they fail as they dont have the direct link to the file.

So my question now is how can I extract the direct url?

There should be a way to capture it since it will be used in the downloadfile dialog.

View 9 Replies View Related

Lookup Data Without Knowing Return Column

Aug 25, 2006

Got a bit of a stinker here. (Well, it is for me anyway. I haven't used Excel in months)!

I want to use a VLOOKUP function (I think) to retrieve data from a list of Exchange Rates on a separate sheet.

The user enters a 'Period' number, selects an 'exchange' variable (the blue text cells). The hope is to lookup the data on the 'FX RATES 06-07' sheet and return the result in the green cells.

I've tried using VLOOKUP but one of the arguements specifies that you nominate a column to return the information - that's the problem, we don't know that information when asking Excel.

View 4 Replies View Related

Auto-format - 2003

Dec 5, 2008

I am pasting output from SAS into a spreadsheet. The data I am pasting cannot be put into columns beforehand. When I do text-to-columns, the data are auto-formatted. This is how it looks before text-to-columns:

159 xx Char 2 2. $2. xx


This is how it is auto-formatted:

159xxChar22$2.00 xx

The loss of the period [2 to 2.] and the addition of zeros [$2. to $2.00] is a disaster because it makes my SAS code non-functional. Is there anyway to stop auto-formatting in text-to-columns? Is there a more user-friendly software besides Excel that would be better to use?

View 3 Replies View Related

Auto Format Image

Jun 9, 2008

I've got a simple macro for asking a user to locate a file of choice and inserting it into specific cell.

Is there a way I can code it so that regardless of the image it 'fits to fill' the cell? The images may vary

The size of the cell will be fixed, but I don;t know who to ascertain that information or tell VBA what it is?

Sub InsertLogo()
Range("A1:E5").Select 'merged cell'
Application.Dialogs(xlDialogInsertPicture).Show
'Object.AutoSize = True
End Sub

I tried using the 'Object.AutoSize = True, but kept getting stumped on a run time error.

View 9 Replies View Related

Auto Sort Pre-defined Format

Jun 16, 2013

I have three columns in Excel

Column state "5K", Column B state number in text format, Column C state text.

I would like to auto extract the number in below sequence by sorting "Column B" to Column D format.

How to do it?

Text
Text
Text

Column D

5K
01
B

5K01B-5K03B

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

View 1 Replies View Related

Auto Filter - Data Format

Nov 14, 2006

I am having trouble with using the auto filter, and I suspect it is due to my data format.

I am importing data from an outside source (I have no control on how the data is output). The data in the column I am concerned with contains various formats, such as numbers, letters, and a combo of the two. e.g.:

12345
sample
sam123ple

I have been taking the entire column and formatting it as text to make all of the data consistent. The problem I see comes when I go to use the autofilter, to say custom>begins with "123". The value 12345 does not show up in my filter. However, if I double click the cell 12345, then hit enter, and re-run my autofilter, it shows up.

Does anyone know the reason why this double-click-enter method forces Excel to recognize the value? And is there a way to mass-produce this command for the entire data set? Right now, I'm up to 5000 lines of data, so to do this on each would take a while.

View 9 Replies View Related

Auto Format To Uppercase Or Propercase

Nov 6, 2006

I am trying to make a column of names appear in upper case (the first letter). I know about Upper(). I cant put that formula in this column because the names are typed there, (it would erase formula). How can I do this as well as have them alphabetically ordered?

View 2 Replies View Related

Formula To Calculate Speed Knowing Distance, Destination Time And Checkpoint Times

Dec 2, 2008

On my spreadsheet i have a bunch of variables:

A1 = Arrival time at Checkpoint 1 - 5:53:08
A2 = Time to destination from Checkpoint 1 - 1:10:18

B1 = Arrival time at Checkpoint 2 - 6:00:56
B2 = Time to destination from Checkpoint - 1:02:30

C1 = Total distance from Start - 2.83
C2 = Arrival Time at Destination - =SUM(A1,A2)

D1 = Speed determined from the other variables
D1 is SUPPOSED to equal 25.00

It also is where I am stumped!!

Not only can I not figure out the math but also how to format the function to get the right answer.

ps: Arrival Time at Destination is only included in case it would be useful to find the answer!

View 7 Replies View Related

Auto Filling The Date Across 31 Worksheets Using Format

May 7, 2014

I have created a workbook with 31 worksheets (they represent each day of the month). I'd like to know how I can auto fill the date in cell A1 across the 31 worksheets without having to type in each day myself. I need the date format to look like this: Wednesday 7th May 2014

In other words, cell A1 in worksheet 1 needs to say Thursday 1st May 2014, cell A1 in worksheet 2 needs to say Friday 2nd May 2014, cell A1 in worksheet 3 needs to say Saturday 4th May 2014 and so on for the remainder of the worksheets for that month.

View 4 Replies View Related

Auto-Filling Date Across 31 Worksheets In Format

May 7, 2014

I have created a workbook with 31 worksheets (they represent each day of the month). I'd like to know how I can auto fill the date in cell A1 across the 31 worksheets without having to type in each day myself. I need the date format to look like this: Wednesday 7th May 2014

In other words, cell A1 in worksheet 1 needs to say Thursday 1st May 2014, cell A1 in worksheet 2 needs to say Friday 2nd May 2014, cell A1 in worksheet 3 needs to say Saturday 4th May 2014 and so on for the remainder of the worksheets for that month.

View 6 Replies View Related

Auto Fill Custom Format Numbers

Oct 15, 2009

I have the following list of numbers

0000 0000 0000 0000 0000 0100
0000 0000 0000 0000 0000 0101
0000 0000 0000 0000 0000 0102

and I need to continue the list to

0000 0000 0000 0000 0000 0326

I tried dragging by the grip in the bottom right hand corner but it changes the first didit only. I tried to put it the numbers in the format

100
101
102

and using a custom format number to put in the extra zeros. This worked fine until I used a countif (or it may of been a lookup) statement in my code to look for 0000 0000 0000 0000 0000 0100 and it can't find it as the number is 100. Is there away around this that will save me typing in an awful lot of zeros.

View 2 Replies View Related

Auto Converting Numbers To Date Format?

Dec 20, 2012

I've been having a problem lately with Excel automatically converting all of the cells on my spreadsheet from standard number format to dates. I've created several spreadsheets for calculations and all the cells in the number formats that I wanted. It's been saved and actually reopened and used several times. I opened it this morning and now half of numbers are now converted to dates. I've had this happen several times on several different spreadsheets. Why is this happening? Is there a setting somewhere that I need to change?

View 1 Replies View Related

Stop Auto Format To Scientific Notation

Dec 29, 2008

I run a macro that imports a table from web page:

[url]

I import only the table with no formatting.

Excel tries to be helpful, and formats some of the cells in scientific notation.

I have tried to format the column to the "Text" format prior to the import with

Columns(2).NumberFormat = "@"

This does not work. If you import the table you can see that rows 1405, 1406, 1407, 1408 all have the same scientific notation value. Their true values should be 0E0, 0E4, 0E8, 0E9 respectively.

There are quite a few other instances in the column when a text value has "E" for the second character that Excel will format on its own.

View 6 Replies View Related

How To Avoid Auto-formatting To Date Format In Excel

Apr 6, 2014

System is generating IDs like 1-OCTO33, 1-NOVE44, which on exporting in excel converts to 1-OCT-33 & 1-NOV-44. How can this auto-formatting be restricted in excel?

To test, you can try entering in excel 1-OCTO33, it converts to 1-OCT-33.

I am looking for some setting in excel, which would prevent it on exporting to excel. Other options like changing column format to text or using a limiter ' will not work in this case.

View 1 Replies View Related

Auto Format Fill Colour Background On Certain Cells

Apr 2, 2007

I have been working on a spreadsheet but I use autoformat for.

For example if the date in the cell matches today's date then it turns the text read and makes it bold.

I was wondering if there was a way to format several cells in a row if a certain criteria was met.

for example

A B C
1 Item Cost Quantity
2 Car £11,520 2
3 Bike £7,500 1
4 Tyres £50 4

Now for example if I set a condition whereas the quatity is greater than 3 then it would highlight the whole row.

So in the example above I would like to to highlight row 4 and Fill colour cells A4,B4 & C4 with a yellow background and Red Text and make the texted bold.

View 14 Replies View Related

Disabling Auto Format Detect Option Of Excel?

Mar 8, 2013

When i enter a value in an excel sheet cell ,Excel auto detect the data type and format that cell to that data type.

For example if i enter 4/4001, excel read it as date and convert the cell format from general to date and displays 4-Aprl.

However if i precede with " ' " this problem is solved but my question ios that can i permanently disable this auto detect option?

View 4 Replies View Related

Format A Cell So That It Auto-populates With Information From Hyperlink

Sep 3, 2013

I am trying to format a cell so that it auto populates with information from a hyperlink. An example is that I want cell E2 to equal the cell B9 from a hyperlink. To make things more complicated I want all of column E to equal cell B9 but from each respective hyperlink.

View 2 Replies View Related

Auto-populating Starting Times From 1 Format To The Other -VBA Required

Jun 9, 2006

If you look at schedule.jpg you will see a how our work schedules are formatted.

Then if you look at schedule2.jpg, you will see what I wish to convert it to.

Now I'm looking for a way to search by the name of our employee (2 seperate sheets) and then by the time which corresponds to the first "1" in the chart under that name and the last "1" in the chart under that name.

So once I fill out our schedule.jpg, it will auto-populate the times on schedule2.jpg.

Is this even possible?

If necessary, I will be able to put both schedule and schedule 2 on one sheet.

On schedule.jpg time starts at 7:00 - Column C
and ends at 8:00 - Column AC

View 9 Replies View Related

Auto Format Some Merged Cells Within A Sheet Based On The Information In Them

Feb 22, 2010

I am trying to auto format some merged cells within a sheet based on the information in them. how to reference the information within theses cells?

View 5 Replies View Related







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