I'm not getting the right output in excel [closed] - excel

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
I need help in pasting values of cell range to another worksheet's next empty cell/row.
Worksheet names - "data" and "test"
Copy values of B2:B15 from worksheet "data"
Paste values to next empty cell in column B of worksheet "test"
This is executed by clicking a button.
Thank you for your help.
I tried tweaking this one, but I really cannot get the output I want.
I found online.
code
This example uses an input.
I don't use text input box, all I need is just to copy what ever in the cell range into the another sheet's next empty cell in specific column.

Related

Formula to return value based in text in multiple cells [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 days ago.
Improve this question
enter image description here
I have a spreadsheet where I want to display certain text dependent on the combination for column an and b.
Below is a picture of the columns and the outcome text I want to display. so for instance if I type "high" and "low stake"....then it will show "handle with care , keep satisfied" in column c
My IF formula didn't work.
enter image description here
Make a "helper" table and use FILTER formula as it would be much easier to change something than in nested IF formula.
Formula:
=IFERROR(FILTER($C$1:$C$4,($A$1:$A$4=A8)*($B$1:$B$4=B8)),"")
Result:

VBA: Dynamically change rows in a table based on a cell input [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
I have the following code which works fine for adding rows to my table:
enter image description here
However, I would like it to dynamically change as my input in cell B6 changes. Hence, delete the inserted rows and replace them with the new input in cell B6. (without deleting any of the data below in the table. Is this possible?
When using the following code i can add rows when changing the input in Cell B6, but it will not delete rows when cell B6 is changes, only add more rows. I have tried to figure out this code, but it deletes the data below in my table. Can anyone help me?

I have a vba code and I want to know the structure of the Excel file (the sheets) on which it is run [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a problem to solve by vba, I find a code that does this task on the internet but I could not understand it, because I do not have the Excel file on which it is run. so my goal is to know the structure of the Excel file (sheets and columns), and especially I do not understand this part:
With Worksheets ("Output of PV")
     .Range (.Range ("_ pv") ....
I say that _pv is the name of a range, but I can not find in the code where is it defined?
My problem is with formula range ("_ pv"), and range ("_ data")
With Worksheets("Sortie de PV")
.Range(.Range("_pv").Offset(0, 0), .Range("_pv").Offset(10000, 100)).Value = ""
EntWith
The Named Range _pv is NOT defined in VBA. It's defined in the Excel Name Manager. You can find the Name Manager in the "Formula" tab of the ribbon.
As for the rest of this code:
With Worksheets("Sortie de PV") is saying: When you encounter, in the lines before the End With an object, method, or parameter preceded with a ., I am referring to this worksheet.
On that worksheet SET the .Value of the Range() where the Row is from first cell in the named range "_pv" and the Column is 10000 rows down and 100 columns over from the named range "_pv"
That second one is a little clunky and could probably just be reduced to something like .Range("_pv").Resize(100, 10000).ClearContents. Also because there is only a single line in that With block, then the With really isn't necessary. So this whole thing could probably just be:
Worksheeets("Sortie de PV").Range("_pv").Resize(100, 10000).ClearContents
If that doesn't work exactly, then referring to the first cell in the "_pv" named range might be better:
Worksheets("Sortie de PV").Range("_pv").Cells(1,1).Resize(100, 10000).ClearContents

Excel need to match and paste to an adjacent cell [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
So the formula needs to look at column D IN SHEET 1, go over to sheet 2, if it finds a match in column A, then paste the coordinates in column B into sheet 1 column E.IMAGE
As suggested by #Jeeped, you may use Excel Worksheet VLOOKUP() function: enter the following Formula into Cell "E2" of the first Worksheet("Sheet1"):
=VLOOKUP(D2,Sheet2!A:B,2,FALSE)
and extend it down to the last row with data in Column D. Hope this may help.
There are a couple of options on how to do it. As jeeped pointed out the VLOOKUP is a great choice for this layout. Alex's answer has the formula looking at the entire A and B column so you may want to edit that to match the rows of data you have. Another way of doing that automatically is
=vlookup(D2,offset(sheet2!$A$1,0,0,counta(sheet2!A:A),2),2,0)
Another method which could be more versatile if your data is layed out differently is:
=index(offset(sheet2!$A$1,0,1,counta(sheet2!A:A),1),match(D2,offset(sheet2!$A$1,0,0,counta(sheet2!A:A),1),0)-1)
Heck I think even the following would work in your case
=offset(sheet2!$A$1,match(D2,offset(sheet2!$A$1,0,0,counta(sheet2!A:A),1),0)-1,1,1,1)

Skipping lines in Excel formula [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have been attempting to figure out a formula to skip blank lines when I am referencing a list of parts for a bill of materials. The problem I've been running into is where the parts list is being held is updated based on what is selected and then transferred to the actual bill of materials there are blank spaces because some machines have more or less parts. I need to skip these and go to the next line and continue with the cells from there. So if I go from Cell if A1:A24 are filled and A25:A29 are blank and A30 has data I want to skip until it gets to A30 and continue on from there (A30:A35).
Let's pretend your data looks something like what's in column A, and the results you want are in column C:
In cell C2 and copied down is this formula:
=IF(ROW(C1)>ROWS($A$2:$A$11)-COUNTBLANK($A$2:$A$11),"",INDEX($A$2:$A$11,SMALL(INDEX(($A$2:$A$11<>"")*ROW($A$2:$A$11)-ROW($A$2)+1,),COUNTBLANK($A$2:$A$11)+ROW(C1))))
Adjust the $A$2:$A$11 to suit your data. Make sure that in the -ROW($A$2)+1 portion, the $A$2 is the first cell of your data, even it is blank (the point being that data could be there, and that it's not a header, and it's the first cell the formula should look at).
Within the loop that you use to hop from cell to cell, put your code within this if statement:
If Not IsEmpty(yourCell) Then 'yourCell needs to be replaced
'your code goes here
End If

Resources