I am wondering if it is possible to use a formula or IF statement within a macro to add a single row at a time if a cell shows as False? For example, if the value in column AD is False, I want it to add a single row under that row that has False. However, if the value in column AD is True, I don't want it to add a row and skip to the next record. I need it for approximately 500 records.
I'm trying to make a macro in Excel 2003 to create x amount of named worksheets that are a copy of a different worksheet.
1. I have a main worksheet that will have a number manually entered into a cell (lets say A1); 2. I have a 'template' worksheet; 3. I'll assign the macro to a button on the main worksheet
If I enter '10' into cell A1 of the main worksheet, I'd like to click the button and have Excel create 10 copies of the template worksheet. These new worksheets should all share the same name with a number after them (ex: banana 1, banana 2..... banana 10).
I have a macro that imports text file and puts a comma after each number (alphanumeric also). I have tried to change it to put single quote around the number and comm afterwards.
Text file listing 123 456 789
When I run my marco I get the following 123, 456, 789 which is what I want...
Now I want the same text to have single quotes around the data example: '123', '456', '789'
All that I have tried to adjust keeps missing single quote at the front end and also missing the single quote at the rear end example: 123', '456', '789
Here is the vba I'm running
Sub GetserialNumbers() Dim FileNum As Long, PathAndFileName As String, TextFromFile As String Const Delimiter As String = ", "
[Code].....
Whe I run this I have to select the text file to get. I keep it in my documents as a quick access. I'm using MS VBA 6.5 Excel 2007 Windows 7 Enterprise.
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
[Code] .....
It works perfectly until additional rows are added/deleted before the indicated rows in the code (It changes the number sequence in the workbook). The number sequence stays the same in the code which means I am now hiding rows either before (delete rows) or after (insert rows) the intended rows I want to be hidden. Is there a way to change the above code to remain with the assigned rows regardless of the adding/deleting of rows before it?
I simply have an entire column with random things in it that I would like to add "www." to the beginning and ".com" to the end. I am very new to excel and I am sure there is an easier way than going through it manually and entering it.
I am triying to write a formula adding two digit in the same cell and return the sum as a single digit as shown below. but not sure how to go about doing it. would appreciate any kind souls to help out.
C5 D5 E5 F5H5I5J5K529121958 D8 F8 H8 J8 2 3 1 4Let's say if 2+9 = 11, than I wan to break 11 into 1+1 = 2, how can I get it done?examplecell D8 is the sum of cell C5 and D5 which is 2+9 = 11. than 11 is further break down into 1+1 = 2cell F8 is the sum of cell E5 and F5 which is 1+2 = 3.Likewise for cell H8 is the sum of cell H5 and I5 which is 1+9 = 10. than 10 is further break down into 1+ 0 =1cell J8 is the sum of cell J5 and K5 which is 5+8 = 13, than 13 is futher break down into 1+ 3 = 4.
I have two columns D and E that contain dates and values. Column D has the dates and Column E contains the corresponding values.
I need a macro to take all of the dates in column D (it is pulled from a different macro so the length of the two columns varies every time but starts at D2) and paste the first value in W1, the second value in AE1 , and so on (every eight cells).
I need to do the exact same thing with Column E except start at Y1, then AG1, etc (still every eight cells).
Been trying to work this one out and have ended up banging my head against the wall.
Basically I have a spreadsheet, in the first column is the person's name, in the secon which team they are in and following this a cell for each day of the month with their availability.
The team name is a selection from a list, the availability is 1-6 (different levels of availability)
I'm trying to do subtotals at the bottom for each separate team, so the very last row each of the cells for each is added up:
Name Team 1st 2nd 3rd 4th 5th 6th 7th etc. Mr X ___1st___1______2__1 Mr Y ___2nd_______2________5__5__5 Mr Z ___1st___1____________3__3__3
Total 1st: 2 2 1 3 3 3 Total 2nd: 2 5 5 5
So basically the formula in the last row goes along the lines of:
Add each cell in the column IF the team name = 1st
I needed to match the width a merged area of seven columns to a single column width (for row autofitting). Adding the column unit values and setting the single column to that value produced a significantly narrower width.
The documentation mentions that the column width unit is scaled to the font type and size and the absolute width is given in points.
This is set by the normal style setting in Excel Options or by VBA application.standardfontsize = 8 (in this case).
For instance, ten columns of Arial font 8 at 8.5 units you would think to be equivalent to a single column of 85 units. In points, the difference is 420 vs. 386.25, or 33.75 points.
Well, the standard character zero has a width at this setting of 4.5 points and 1 unit is 8.25 points, leaving 3.75 points for margins.
Then (10-1) margins allowances time 3.75 points resolves the difference.
Determining the margin allowances is straightforward, and reveals that the gradation with size is stepped by MS design. For instance, sizes up to 11 use 3.75 points for margins and increasing points for characters (except between 9 & 10). Sizes 12 through 18 use 5.25 points, 20 & 22 use 6.75, 24 & 26 use 8.25, etc.
I have created a table for this purpose, however I rarely use a "normal" other than 8, so I can probably use that set in programming.
1st - Need a macro to change a range of cells colours based on a single cell having a value greater than 0.001. ie. cells A1 - G1 need to change to grey based on cell F1 having a value greater than 0.001 entered in it?
2nd - Also a macro for deleting the text contents of cell C1 based on cell F1 having a value greater than 0.001. Therefor if cell F1 has a number greater than 0.001 it changes the colour of celss A1 - G1 and also deletes the text in cell C1?
Data in Col. A is converted as a line sparkline and data in Col. B is viewed as a Column sparkline.
I wish to view both the sparklines superimposed on each other in the same cell using excel's native sparkline option (not a third party software). Is it possible using some sort of Excel wizardry?
I want to save a single sheet from my Excel file to PDF. But this Macro saves all the sheets in separate pdf files. How do I adjust it to only save the breakdown sheet of my Quoting workbook?
Sub Save2PDF() ' ' Save2PDF Macro
Range("L66").Select ActiveWorkbook.SaveAs FileName:= _ "Macintosh HD:Users:myratriegaardt:Desktop:Q1Breakdown.pdf", FileFormat:=xlPDF _ , PublishOption:=xlSheet ActiveWindow.SmallScroll Down:=-160 End Sub
I have a userform that I enter information into fields and I would like to created a command button that will insert the information into the workbook ....
it has various headings - but the ones I am stuck on are below.
BADGENAMEDATE Issued
He has set up a basic vlookup so that typing in his badge number also will type out his name. However, he also wants the current date to come up every time he does this.
As the names and badge number don't change and have no difference from row to row, how can I get it to date stamp it with a different date each time?
I am using Excel 2010 and need to create something like a histogram that will have large regions of null values. In other words, my histogram might look like this...
x x x x x x x __x_________x___________x______ 100 250 420
[My laboriously drawn histogram does not display correctly. It is supposed to have 3 x's above 100, 2 x's above 250, and 5 x's above 420]
I have data in the form of: Value Prob. 100 30% 250 20% 420 50%
I have Excel giving me a histogram that looks like this... x x x x xxx xxx [This histogram also didn't turn out. Again, it is supposed to be 3 vertical x's, 2 vertical x's, and 5 vertical x's]
What I have tried to do is to create a list based on the lowest and highest numbers (e.g., 100 and 420) and split that into equal increments. I then intended to use a VLOOKUP or something to pull back the probability associated with the number in my list nearest the data value I have.
I couldn't get VLOOKUP to work correctly, so was happy when I found the following thread on Ozgrid. [URL]
However, in each of the solutions listed in that thread, I get faulty results. I am attaching a file that shows the errors and what I am trying to get : Example.xlsx
Perhaps there is some easier way to do what I am attempting to do. This architecture makes sense to me, but sometimes the perfect solution doesn't make sense until I see it...
I'd like to apply multiple formula to a set of cells on a summary page. My summary page also contains 3 variable dropdowns, and I'd like to display data based on the text selected in those dropdowns (pulling data from 2nd tab "Variables")
The following formula works in the first instance:
=IF(AND(H4="Product Type A1", H6="External", H8="Existing"), Variables!C4, 0)
What I'm struggling to do is add additional formula to the same cell in order to deal with the remaining eventualities of the drop down variables:
Variable 1: Product Type A1 Product Type A2 Product Type B1 Product Type B2
Following the tips doesn't allow to remove a character.
I exported email addresses from Outlook and they have the following character ' in front of the email address.
Using Excel 2007.. it says :"check if your search formatting and criteria are defined correctly. If you are sure that matching data exists in this workbook, it may be on a protected worksheet. Excel cannot replace data on a protected worksheet"
So I made a new file, and copied and pasted the cells into the new spreadsheet.. same message.
is it possible using vba ideally with a button marked save, to save a single worksheet and name it, in CSV format
Then I would like to be able to do the reverse load a CSV file back in to a work sheet
Expanding upon this
1. Click a command button with caption “save”
2. Take the name of a given sheet, in my case DataToUpLoad and append it with a number to give a sheet name of DataToUpLoad 1 the first time it is save and DataToUpLoad 2 the next time and so on
3. Click another command button with the caption “load” interact with usual dialog box.
My current work around is to copy a sheet open a new work book past the sheet in the save that work book as CSV
The reason this is required is to mate up with the php on the server side
My Excel 2007 worksheet contains a cell where a percentage is manually input. A freight cost is calculated based on the input percentage. Typically, the percentage is 3-7% but once in a while freight is excluded and the percentage is zero.
My issue is that when a 0 is input the cell appears blank and I would like it to display 0.00%. The remainder of the worksheet needs to have the zero display turned off.
How to add an appointment to a shared outlook calendar from Excel. I will be entering shipments in an Excel page and would love to just click a button and have an appointment made. I am very much a novice on how programs communicate with one another. The only information that will need to go on the appointment is the subject, location, and time. We set all our appointments at 15 minutes duration. The code I have so far is this:
[Code] ....
The problem is it only adds it to my default calendar. I need to be able to add it directly to the shared calendar in Outlook.
I would like to add a search box to worksheet 1 in my workbook of 162 sheets. I need the search box to search sheet 23 cell range B11:B342. These cells contain names of employees.
I would like the option of entering a name into the search box and either hitting enter or clicking a "go" button to search. If the search is successful, ideally a function would automatically redirect the user to the located text and if the text cannot be found, a message would appear indicating as such.
When it comes to VBA, I am a very basic user, so I would need the code written out for me and I need to know exactly where to put it and how to get the search box to appear.
I have a date stored in a variable and I need to add month(s) to that date. For example if I have 10/1/2013 in a variable if I add 1 to that month the result should be 11/1/2013. I am using the following formula but the problem is in the result date format, which shows as 1/31/1990, if I add 2 to the original date, the result is 2/29/1900 which ideally should have been 12/1/2013.
My formula is : ActiveCell.Value = "=date(year(" & last_date & "),month(" & last_date & ")+" & i & ",min(day(" & last_date & "),day(date(year(" & last_date & "),month(" & last_date & ")+" & i & "+1,0))))"
I've got several Excel files that need to be edited separately. Once they have been edited, I need to paste the content of each file in a single separate Excel file.
Is there a way to retrieve the content from all the files in a folder, and merge it in a single file?
I have multiple buyers that use an Excel workbook containing several macros to perform edits on other workbooks they receive via email. Generally, they have the workbook containing the macros open, and they can double-click the workbooks they receive in the email messages to open them, and the macros are available from the "master" workbook.
Recently, however, some of the buyers have been getting new computers running Windows 8 and Office 10. Now when they have the "master" workbook open, and double-click the attached workbook in an email, (Outlook 10), the new workbook opens in a new instance of Excel, and as a result the macros are not available to run on the newly opened workbook.
The work around has been to right-click the attachment and save it to their desktop, and then use the File/Open command from the "master" to open the new file. This is a hassle and takes extra time.
I'm sure I am overlooking a setting somewhere that tells Excel to always open new workbooks using the same instance of Excel, (there are two people using the new systems that aren't having problems, and two that are), but for the life of me I can't find where to set these parameters.