i have 2 listboxes with numbers if user has selected choice in both then i want to enable okbutton. i tried in okbutton's mousemove: if listbox1.selected = true AND listbox2.selected = true then okbutton.enabled=true.
I want to select email addresses in a particular cell. Since every email address will contain @ so I want to extract the email address from the cell on the basis os all the characters to be selected on the left & right of the '@' before a space is encountered.
I would like to know if it is possible to format a cell where you enter a date (08-02-2009) and it returns "08-02-09 thru 08-08-09" that weeks date range in that cell.
Format custom mm-dd-yy " Thru " mm-dd+6-yy I know will not work but is there a way to do this??
What i need is the following: In cell B1: if A1 is greater than 08:00am but less than 14:00pm than B1 should have a tick which is green, if cell A1 is greater than 14:00pm than B1 should have a cross which is red...
I dont know the correct terminology with whick to phrase my question, but I would like to know if its possible to copy say columns A-J on "worksheet A", and copy columns A-J on "worksheet B", each of which have different column widths, and paste them both to "worksheet C"?
My problem is columns A-J on "worksheet A" are perfect and copy and past fine to "worksheet C". But when I copy columns A-J from "worksheet B",which have different widths, and paste them to "worksheet C" right below what I had previously pasted from "worksheet A", the column widths interfere with each other.
I have tried a special paste, and it seems to re format everything above the current page its pasting?
I have created a multiple choice quiz maker that randomizes the questions and responses. This means that the quiz questions/responses must be copied and pasted each time a new quiz is generated. But in doing so, Excel loses formatting (such as super and sub scripting) and some special characters (like pi, alpha, the degree symbol).
Is there a way to get such things to copy properly from cell to cell, sheet to sheet, using Excel?
I am trying to concatenate some string and integer. It is always for previous month end date, i.e, 7/31/2009 or 8/31/2009.
Here is I have the data now Profit and Loss for After running the macro I would like to be Profit and Loss for 8/31/2009 Here is what I wrote so far which does not work. I am sure there is simpler way to do it. I put the month end date 5 columns to the right for the time being and in the intention after deleting it after concatenation automatically.
I would like to use the following line to calculate the formula, In the format i have already specified.
But to leave the values in the cells apposed to the formula.
This way when i delete the source sheets the results will still be left as values not formulas.
It can probably be done in 3 lines but i have to do this for 9 different rows so was wondering if there is a way of combining the three tasks into one row
I am trying to combine text from multiple cells into one cell. I am referencing cells that reference cells on another tab. I have tried several formulas (see attached) but I have not been able to get rid of the zeros in the resulting string. I know I could reference the original cells, but I would like to find a solution to this without using VBA.
if you look in Column G you will notice the number on the right side of the column is indented one space too many (for any number that is 6 long in column A).
Is there any way to do an IF C=6 and then have it remove a space from before the number in Column G to have it line up?
I am trying to concatenate multiple strings of text where each may have composite or compound formatting. Is there any way to maintain the formatting? The Characters.Insert method won't work because the resulting string is greater than 255 characters. See an example below.
String 1: When you simply concatenate String 2: these strings, Excel discards String 3: formatting at the character level.
Required Result: When you simply concatenate these strings, Excel discards formatting at the character level.
two formulas for one data set. The data is attached in the spreadsheet: "Product IDs". The data is a set of Master Product IDs (parent) and the Linked to them Products (children). I need to create a relationship between unique parents (Master Product IDs) and their children (Linked Products)
I need to create two formulas:
1. From the Data Set table, need to vlookup the unique value in column A (Master Product ID) and return comma delimited (concatenated) corresponding values from column B (Linked Products). So, the result will be as shown in Table 2.
2. From the Data Set table, need to vlookup the unique (de-duplicated) parent/children relationship in column A (Master Product ID) and return comma delimited (concatenated) corresponding values from column B (Linked Products). There are total 3 parent/children relationships in Table 1. So, the result will be as shown in Table 3.
I have an Excel 2010 spreadsheet that I am using to save several numbers all in the same column. These numbers can range from the several thousands up to billions. The formatting I am using for these numbers is Number (using 1000s separator).
number_forma.png
I am also using the spreadsheet to generate a text string for each of the numbers. I don't want the text string to show the number as it is, I want to shorten the number by only showing the first few digits followed by a "B" for billion, "M" for million, or "K" for thousand. For example, in the text string I want to show 1,600,000 as 1.6B.
In order to shorten the number I use the cell in the column to the right of each number. This cell uses the following custom formatting (which I found by doing a Google search): [>999999999.999]#.0,,,"B";[>999999.999]#,,"M";#,"K";
custom_format.png
As you can see the formatting is quite complex (at least for me it is) but it does what I want it to do.
Here is a screenshot of what the original and custom formatted cells look like:
custom_formatted_cells.png
As you can see the custom formatting works and does exactly what I wan
The next column (after the custom formatted number) is where I put the generated text string for each of the numbers. As I stated above, I want the generated text to use the shortened version of the number (e.g. 1.6B).
To generate the text I use the CONCATENATE function with a reference to the cell containing the shortened number as one of the arguments. For example:
CONCATENATE("SOME STRING ", B1)
Where B1 is the custom formatted cell.
The problem I am running into is, the text that gets generated doesn't show the shortened format of the number, it shows the full number. Here is a screenshot demonstrating what is happening:
concatenate_formula.png
As you can see the generated text is "SOME STRING 1600000000". This is not what I want. I want the generated text to be "SOME STRING 1.6B".
I think I understand what's going on. When the CONCATENATE function references a cell it takes the actual value of the cell and ignores any formatting. (I suppose formatting is just the way you see the data, not how underlying functions receive the data.)
My question is, how can I re-write the CONCATENATE function (or use another function, etc. available to me) to use the formatted version of the cell?
*UPDATE* I have attached my spreadsheet as an attachment to this post (tackyjan_excelforums.xlsx). Please note that it was created and saved using Excel 2010.
I have a person who needs to be able to copy and paste values very frequently. She would like me to set up a personal macro on her PC that will allow her to be able to right-click in a cell and have a context item that is paste values so she does not need to go to the paste special dialog continually.
E.g: She selects a range from one workbook and copies it, She then selects a cell in a second workbook and pastes the values into the second workbook. She does not mind pasting the formatting, but she does not want to paste the formulas as there are many named ranges in the formulas and if she inadvertently pastes everything, all of a sudden the next time she opens her second workbook there are links to the first. All she wants in the second workbook are the values, not the formulas.
I am trying to copy a range of cells and Need to transpose the values. Easy Enough? When I right-click and paste special, it gives me a new window with an array of options but not the standard Paste special value screen. I have used the others in the past and just pasted text. However this does not give me the paste transpose option which is what I need.
I am sure this is a User error where there is something about the way that I am copying this information but I am Drawing a Blank...
I have a workbook where I want to retain FORMATS in all of my cells in all of my sheets, but allow the user to enter data. So I got this code to undo PASTE and instead do a PASTE SPECIAL VALUES:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim UndoString As String
On Error GoTo err_handler
UndoString = Application.CommandBars("Standard").Controls("&Undo").List(1) If Left(UndoString, 5) = "Paste" Then 'Only allow Paste Special|Values Application.ScreenUpdating = False Application.Undo Target.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.ScreenUpdating = True End If......................
I have a macro that should allow users to change a certain range to values, but I have problems with that last piece. Can anyone tell me what the command is to paste the range as values?
Sub Change_Range() Dim UserRange As Range DefaultRange = Selection.Address On Error Goto Canceled Set UserRange = Application.InputBox _ (Prompt:="Change Range to Values:", _ Title:="Range Change", _ Default:=DefaultRange, _ Type:=8) UserRange.Copy UserRange.PasteSpecial Canceled: End Sub
I have a workbook which contains lots of formula and is therefore very large (about 70 mb). The sheet pulls information from field instruments every hour of every day for the entire year.
I want to write a macro, that loops through a range (B5:B8764) and copies the entire row if the value in column B is less than =NOW() - 7 days. The copied rows should then be pasted with values only exactly where they were located e.g. row 5 should be pasted back to row 5 the only difference being only the values will be pasted.
I have a perplexing problem. I created code to copy a worksheet that has the correct page setup and then copy/paste special to get just the values, not the formulas from the master sheet. It works standalone - the copied worksheet after doing the paste/special just has the data along with the master sheet's original page setup. When I include the code within a For Each... loop, it only copies the worksheet and I get the formulas. What is different between the two approaches that would cause the loop code to not do the paste/special values?
create a macro to perform paste special as value function. First scenario.. IF cell A2 is equal to 1 copy paste special values in I2:J2 cells ( this cells are formula.. need to perform paste special to prevent it in updating)then IF A3 is equal to 2 copy paste special values in I3:J3 cells.same action till A31. Second scenario is if O2 cell has a value of 100% copy paste special as values formula in K2 cell, then if O3 cell has a value of 100% copy paste special as values formula in K3 cell.. same action till O31 cell. take note I manually input values in A2 TO A31 cells as well as on O2 to O31 cells. I want the macro to perform the paste special as values only when I put value in Cell A. and Cell O (CELL A and CELL O are not dependent to each other so they should function individually in the macro).
I have a few Excel files in use in my tv station's newsroom. The purpose is to allow Producers to enter text and then send that data to on-air character generators.
Here is the problem I'm running into: I have protected the sheets, which contain unprotected cells so the users can enter data....but if they copy something from a web page and paste it into the Excel file, that cell's formatting changes to include the html coding that was also (inadvertantly) copied.
How can I set up Control+V to ALWAYS act like "Paste Special/Values" so that only the text-content is pasted and the formatting of the cells in the my Excel files is not touched?
Sub import() On Error Resume Next Dim wb As Workbook Dim c As Range Dim rngTo As Range
For Each c In Range("D1:D10").Cells Set wb = Workbooks.Open(Filename:=c.Value) With Workbooks("DigitalTicketMaster.xls"). Sheets("All") Set rngTo = .Range("A" & .Rows.Count).End(xlUp).Offset(1, 0) End With wb.Sheets("Combined").Range("A2:C100").Copy rngTo wb.Close ............................................. we have a change on our sheet, make it easy for our guys. Column A, is the date. Today 6/29.
They enter it once at the top, and it pastes for them automatically (a simple cell = $E$1)
But now, when I use the macro, it pastes over the formula that I don't want nor need, and have to call the second macro for. But then everything in that column shoes E1 on my new sheet, which is not the date... and each sheet changes dates, so I can't just have the date all the same.
What can I do in my original code to still make it loop, pull all my pages that I tell it to, but paste values only?
Would it be possible, in my loop, to highlight my cells, on that sheet... A2:C100, copy them, paste themselves right onto themselves, as values only, then copy over to my new sheet?
I have a little bit of problem with lookup function. When i paste values from another worksheet (paste special, values) in a cell which is lookup value i get #N/A. These values are numbers. When i put '7 for example i get the values i want from lookup table. I have a lot of these cells and its tedious job to put ' in front of every value. Is there a quicker solution?