Hello,
I'm trying make a simple macro that will clear the contents of certain cells in a row based on information in other cells.
So if C1 = 1 and F2 = 1, then I would have the contents of F2 be cleared. This repeats down columns all the way to C22 and F22.
I have a very messy way of doing...
I need to write a sub, where the actual code for this sub is stored in a cell.
I.e.
Sheet1 A1 has “Call MasterCode”
How can I write a sub that actually reads the contents of a cell and actions it?
Or I simply need to copy paste the contents of A1 and paste it to the sub etc.
Many thanks in...
Hello
IF anyone can help me please
My question is how can make it work when double clicking on cell copy the contents of this cell and from another cell and then paste the contents from both at another cells.For examble double click on cell D4 copy the contents of D4 and contents of K4 from the...
Hi,
I'm wanting to loop through all XLSX files and add the cell contents of Sheets("Sheet1").Range("B1") to the end of the corresponding filename.
Is there a quick way to do this?
Thanks for any help
Hi All,
I want to clear contents of A1:F1 by selecting "Clear" from G1.
G1 is a list "Select","Clear"
So by selecting "Clear" from G1 would clear contents from A1:F1.
And then by selecting "Clear" anywhere in column G would also clear the same row in columns A:F
I'm trying to avoid creating...
Hi all!
In my workbook I have 5 sheets.
In 2 of the sheets named "DATA" and "DATA COPY" I have imported a large array of data from another folder through macro and used those data in other 3 sheets.
I kept these 2 sheets in "xlSheetVeryHidden" format to deny access to users. In "DATA" and...
I have a question in regard to the clear contents command in VBA. I am currently using the following for a table with data in it.
Range("A11:w19").ClearContents
It does exactly as it should but I have a row that I don't want the data (Formula)cleared in. For instance in this range listed...
How can I display the contents of an array in a messagebox?
This fails on the MsgBox line.
Dim MyArray(1 To 3, 1 To 1) As Variant
MyArray(1, 1) = 1
MyArray(2, 1) = 2
MyArray(3, 1) = 3
MsgBox MyArray
Thanks
Hi
I've searched the forum and can't find this addressed - sorry if it's already been answered.
I have a range of columns, B to E, where the colour of (eg) B5, C5, D5 and E5 are dependent on the contents of E5. I've got 12 conditions defined, and they are working well. (eg =$E5="ABSENT").
If...
Hello, expect a silly question, but does
VBA code Selection.clearcontents
Do the same as if you highlight all the sheet contents and press delete? I have just noticed that some of my code is not working correctly, however after using delete all is correct.
Good morning,
Is there a macro that I can use to combine multiple cell contents into one cell and this one cell must have a total of 190 character spacing. At the same time some of the contents of a cell require specific spacing and can not lose the leading zeros.
Here is the excel formula...
Hi all,
I've inherited a workbook with the following code which renames the worksheet (tab) name as per the contents of a given cell, say cell A1.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set Target = Range("A1")
If Target = "" Then Exit Sub
Application.ActiveSheet.Name =...
I have office 365 and we just had an update.
Before the update, I could copy/paste something (ctrl c/v). Then I could select a row and press "crtl +" to insert a new row. The new row would be clean, no pasting of current clipboard.
After the update, I press ctrl + and the entire row is filled...
I already have the code for replacing a string with a different string. It works when I know what the contents of the cell are. For example, in this case "A1" contains the string "test".
Sub Button1_Click()
Dim OriginalText As String
Dim CorrectedText As String
OriginalText =...
I am trying to find a way to automatically move an entire row based on the contents of a single cell in that row.
In column M the values range sporadically from mycard1 - mycard1500. Not all number between 1-1500 are used so sorting would not work. Is there a way to automatically make the...
I have a table named “employees” (A:AZ3000).
I would like VBA to clear contents of A:S of employees that are not “Manager” in Column C.
So if Colum C Row 7, is not “Manager” - Columns A7:S7 should clear contents and this should repeat up to row 3000.
I found some codes online but could not...
The cells of an excel sheet exported from tally not displaying its contents fully on the formula bar which is why i'm unable o apply filter on those cells.E.g- 500.00 Dr is only showing 500.00 in formula bar and i need to filter aside the Dr's and Cr's separately.Please help..
Hi, I have a problem with my table of contents in Excel file, when I make a PDF file of the excel file then all links working without hyperlinks in the table of contents.
Before I don't have the problem with excel 2007 but now with excel 2016 well.
How can I fix it?
Thanks
Hello I need some help with the following macro which I am using to clear the contents of specific cells.
Basically the macro should select cells C9:F9 clear the contents and then loop down 7 rows to C16:F16, clear those cells and then keep on looping by 7 rows until it reaches the lastrow but I...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.