I'm getting a compile error and Syntax error
I have tried both
.PasteSpecial xlPasteValues
Paste:=xlPasteValues
Set wsCopy = Worksheets("Sheet2")
Set wsDest = Worksheets("Sheet3")
Find last used row in the copy range based on data in column A
lCopyLastRow = wsCopy.Cells(wsCopy.Rows.Count, "A").End(xlUp).Row
Find first blank row in the destination range based on data in column A
'Offset property moves down 1 row
lDestLastRow = wsDest.Cells(wsDest.Rows.Count, "A").End(xlUp).Offset(1).Row
Copy & Paste Values
wsCopy.Range("A4:BL" & lCopyLastRow).Copy _
wsDest.Range("A" & lDestLastRow).PasteSpecial xlPasteValues
To paste the value only without the paste value I'm getting all the formulas copied I only want the values.
Copy & Paste Values
wsCopy.Range("A4:BL" & lCopyLastRow).Copy
wsDest.Range("A" & lDestLastRow).PasteSpecial xlPasteValues
Related
I'm trying to make a drop-down list in my spreadsheet, my spreadsheet has a couple of sheets but the main two sheets are "Master" and "Sheet3".
I have made the drop-down list using the Data -> Data validation as shown in the below screenshot:
And in the "Sheet3" sheet there is a big table (1000 columns) of data that I want to make a drop-down list from, from each column in it.
Now what I want is to drag copy this cell down so that the criteria will be like this:
=Sheet3!A1:A
=Sheet3!B1:B
=Sheet3!C1:C
=Sheet3!D1:D
...etc
and so forth for 1000 rows, but when I do this, it does not increment the column letter, it's just like the first cell criteria value (=Sheet3!A1:A) for all other rows.
Is there a way to make this work without me having to edit each row in this 1000-row column manually?
Thank you all.
We have Sheet3 with 1000 column and we want to get a drop down of all 1000 column in Master sheet in a single column.
Solution
01 - Transpose Sheet3 to use it as a source of Data validation.
=TRANSPOSE(Sheet3!A1:999)
02 - Go to Data validation and set the range to ='Sheet3 Transposed'!1:1 as soon as you click save it automatically changes to ='Sheet3 Transposed'!$1:$1 with a abslout refrence just change it back to ='Sheet3 Transposed'!1:1 with removing $ dollar signs.
03 - Copy the the drop down cell D2 and paste it in the range D2:D1001, we get Error: Invalid Input must fall within specified range, in the whole range D2:D1001, to solve it copy the range 'Sheet3 Transposed'!A1:A1000 and in D2 right click: paste special > Values only
enjoy :D
Here is an example of a formula I have written:
=DatabaseVerName&"."&INDIRECT(ADDRESS(4,2,1,TRUE,""&B2&"ChangeLog"))
DatabaseVerName is a named range ...It just so happens that the first word in the string (in this case Database), is the value in cell B2. I would like to be able to update the formula so that when I change the value in B2 (say to the word Report) that the formula references the named range "ReportVerName" and not "DatabaseVerName". FWIW, B2 is a a data validated list with 4 options available.
Is this possible and if so how would I do it?
I haven't tested it, but something like this might work.
=INDIRECT(B3 & "VerName") & "." & INDIRECT(ADDRESS(5,2,1,TRUE,""&B3&"ChangeLog"))
So B3 would be equal to "Database" or some other text, and would get concatenated in front of "VerName" to make up the name of a matching named range and then the remaining part of the address, which appears to have been working for you, would be added.
I haven't tested this, but I think it should work. Let us know.
Im trying to copy this formula
= INDEX(myrows, MATCH(B3 & "/Fashion Men",mycolumn,0) )
to the whole column.
WORKING OF THIS FORMULA:
(this formula looks for value in given cell(B3 in this case) and concatenates with "/men" and searches it in range "mycolumn" and then after finding it, it gives that cell's row . so the final output is a single row present in range myrows)
I've tried the following but it only prints out a single row and doesn't goes down to read the values of B4 and so on.
=ARRAYFORMULA( INDEX(myrows, MATCH(B3:B & "/Fashion Men",mycolumn,0) ) )
You can try something like this instead:
= ArrayFormula(IFERROR(VLOOKUP(B3:B& "/Fashion Men",{mycolumn,myrows},{1,2,3,4},0)))
You will need to update the {1,2,3,4} array to match the column numbers in the myrows range that you want to return
I have a spreadsheet that have a column containing github issue numbers, how can I make all the fields in that column a url to the issue on github.
lets say https://github.com/myaccount/myrepo/issues/ is where the issues exist, I want to make all those fields link to "https://github.com/myaccount/myrepo/issues/{existing-issue-nb-here}"
e.g: in line 54, column B(github issue #) should be a hyperlink to https://github.com/myaccount/myrepo/issues/652
If you never overwrite the first row of the column with the links you can use the HYPERLINK formula inside of an array formula
={"github issue #";
ARRAYFORMULA(IF(LEN(B2:B),
HYPERLINK("https://github.com/myaccount/myrepo/issues/" & B2:B,
B2:B), ""))}
If you are importing / copy pasting Column B and want to replace it with a link you need to do that with a script that, for every cell does
setFormula("=HYPERLINK(CONCATENATE(https://github.com/myaccount/myrepo/issues/ ,bugId), bugId)")
Where bug ID is either read from the row in column B or in the data you retrieved via script.
I have an table in an MS Excel 2010. The table has two columns. The first column is a name of a person (Col A), the second column is the marks that the person secured in an exam (Col B).
I am applying conditional formatting. If I choose the following wizard
Home > Conditional Formatting > Format all cells based on their values
I can color the Col B on a 3-color scale. This is exactly what I want. However, I want it for the entire row and not only the cell in Col B. I want the name also to be formatted in the same color as the marks.
Anyone knows how to do this?
I have already looked around a bit. The following came close to did not solve the particular problem that I am trying to.
http://www.howtogeek.com/howto/45670/how-to-highlight-a-row-in-excel-using-conditional-formatting/
Conditional Formatting Rows Based on Date
You're probably going to have to use VBA code for this.
Right click the worksheet label and select 'View Code'
Inside the code window, paste in the following code:
Sub RunMe()
Dim xRng As Range, xCell As Range
With Me
Set xRng = .Range(.Cells(2, 2), .Cells(.Rows.Count, 2).End(xlUp))
' Change the first '2' above to reflect the starting row of your data
For Each xCell In xRng
xCell.Offset(0, -1).Interior.Color = xCell.DisplayFormat.Interior.Color
Next xCell
End With
End Sub
Now every time you run the macro (Alt-F8, select macro), column A will be formatted with the conditional formatting assigned to column B.
If you want this process to be automatic, change:
Sub RunMe()
to something like:
Private Sub Worksheet_Activate()
' This will run the macro whenever the worksheet is selected
or you could assign the code to a keyboard shortcut or a command button etc.
If you would like the code to run every time the file is opened, saved closed etc, add the code instead to the ThisWorkbook code window (although you'd have to alter the code slightly as 'Me' is referencing the particular worksheet in which the code is placed).