Another approach using dictionary [code] Private Sub UserForm_Initialize() Dim arr As Variant arr = GetDistinct(Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)) ListBox1.List =...
Thanks a lot PNRao for this great solution Another approach using collection [code] Private Sub UserForm_Initialize() Dim ws As Worksheet...
Thanks vaali... this is the data sheet1 data EID NAME PAY PayDay 14123 Joe1 $1,234.00 29-Jun-17 14124 Joe2...
HI, Here is the required macro to search a field and if value found copy the whole row into another...
I found a solution like this :Records in between two specific dates easily can be filtered using drop-down lists ....
I found a solution as follows: Watch the video to see how it's done and download example file : https://youtu.be/SZduAoOtiS0
I have sorted the above problem. Code is given below... [code] Sub seperate() Call CleanSheets MsgBox "1 of 10 Cleaning...
I have two columns A & B with numbers in it. I have to deduct the number in Column A with the number from Column B. The deduction is to be done in Column A.I want column A to display the calculation with the amounts from the respective cells. For e.g If Column A1 has 100 and B1 50, then A1 cell should show the formula” =100-50″.
I have to do this calculation in a specific range only (e.g A10 to A20).
Is it possible?
Hi, The below macro will check each cell in the selection, and prints the calculation if the cell is in Column A.
Dim myVal As Range
For Each c In Selection
If c.Column = 1 Then ' check if the column is 1 (i.e A)
c.Formula = "=" & c.Value & "-" & c.Offset(0, 1).Value
Its not possible as per my knowledge. You should have data in cell (B1) and cell (C1) . Now you can subtract value at cell A1 like(=B1-C1).
Here is the screen shot for your reference.
Well, I thought as the question was framed under “VBA” I don’t have to mention it and that made the difference.
Please find the screen shot.
What I wanted to know is , can we edit the macro in such a way that it picks up the value from column B and subtracts it from the value in column A. The formula bar should show the calculation with the values in column A and B displayed. The cell will show the result.
Please share using the share button above.
If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.
Found the answer useful and wants to credit the user, then vote the answer (vote up).