Yes, a perfect formula, too! I love both solutions!

And also added my Excel version to my profile.

Thank you!]]>

Adding your XL version to your profile would be helpful as latest versions have newer functions

Code

`=TEXTJOIN(",",TRUE,IF($B$2:$B$7=$B2,$A$2:$A$7,""))`

Does the job

Yes, a perfect formula, too! I love both solutions!

And also added my Excel version to my profile.

Thank you!

]]>]]>

Code

```
If Worksheets("Reporting").Cells(NextRow1, 9).Value <> "" Then
Cell.Activate
Cell.AddCommentThreaded (Worksheets("Reporting").Cells(NextRow1, 9))
Worksheets("Reporting").Cells(NextRow1, 10).Value = ActiveCell.Address
Exit For
End If
```

Thanks in advance for your help.]]>

Thanks in advance for your help.]]>

I am in the process of learning some basics about VBA and was just wondering if it is possible to import data from a PDF file into an excel sheet, if so, what is the most efficient way to do this.

Thanks]]>

I am in the process of learning some basics about VBA and was just wondering if it is possible to import data from a PDF file into an excel sheet, if so, what is the most efficient way to do this.

Thanks

]]>is there any macro to link common key in too different sheets/worksheet?

thanks in advance!]]>

is there any macro to link common key in too different sheets/worksheet?

thanks in advance!

]]>forum.ozgrid.com/forum/index.php?thread/1192887/]]>

I was using vba find method and it suddenly it stopped working

this is my code

Private Sub ComboBox1_Change()

Dim c As Range

Set c = Sheet1.Range("2:2").Find(ComboBox1.Value, LookIn:=xlValues, lookat:=xlWhole) 'combobox1.value = Sales

c.Select

MsgBox…]]>

I was using vba find method and it suddenly it stopped working

this is my code

Private Sub ComboBox1_Change()

Dim c As Range

Set c = Sheet1.Range("2:2").Find(ComboBox1.Value, LookIn:=xlValues, lookat:=xlWhole) 'combobox1.value = Sales

c.Select

MsgBox c.Address

End Sub

forum.ozgrid.com/index.php?attachment/1234570/

I want it to select "Sales" from combobox1 but it is selecting cell "f2" which has empty no text in it.

could anyone please assist to resolve the issue

]]>So you can consider this a non-starter.]]>

So you can consider this a non-starter.

]]>]]>

]]>Display More***SOLVED***

After giving your suggestion a second look and a bit more digging into arrays and what I was tring to do and also breaking this out into it's own subroutine, I found the issue;

I had created the string with each sheetname in quotes, e.g "HNB004", "HNB005". What I realised when looking at the locals was that it was attempting to create the array after Split as: Sheets(""HNB004", "HNB005", "HNB006"").Move

I modified the formula that added the quotes to each sheetname so as it didn't and all working now.

I better understand arrays and the use of the Locals window now.

Thank you.

]]>

Code

```
Sub DeleteEmptyRowsColumns()
Application.ScreenUpdating = False
Dim x As Long
With ActiveSheet
For x = .UsedRange.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(.Rows(x)) = 0 Then .Rows(x).EntireRow.Delete
Next
For x = .UsedRange.Columns.Count To 1 Step -1
If WorksheetFunction.CountA(.Columns(x)) = 0 Then .Columns(x).EntireColumn.Delete
Next
.UsedRange.SpecialCells(xlBlanks) = 0
End With
Application.ScreenUpdating = True
End Sub
```

Display More
I…]]>

I have a large worksheet of data in one master sheet (titled "CPO"). I am looking to create a macro to return specific data from that sheet to another (titled "Search") based on a matching date search. The date is located in cell 'B2' of Search. I would like to paste these values in the Search sheet beginning in row 5.

Date values in the master sheet are located in column 'J'. For each entry matching the query date in Column J, I would like to return the data from column 'A' in CPO to column 'A' in Search; from column 'B' in CPO to column 'B' in search; from column 'F' in CPO to column 'C' in Search; from column 'H' in CPO to column 'D' in Search; and from column 'L' in CPO to column 'E' in Search.

A complicating factor is that I need to duplicate this such that each returned row of data appears twice, once with the final pull from column 'L' in CPO appearing in column 'E' in Search, and once with the same number from column 'L' in CPO appearing in column 'F' in search (debits and credits).

Finally, for returned values labeled as "Principal" (located in column 'H' of CPO, to be returned to column 'D' of search), I need to duplicate this once more. The result would be two debits and two credits for each principal payment, and one debt and one credit for each interest payment. Debit would be in column 'E' of Search, and credits would be in column 'F' of Search.

I hope I've described that clearly enough. I realize it is a complicated problem (especially for me), and is something that might be better suited for a different program--unfortunately I need to do this in Excel.

Thanks in advance to anyone who takes the time to read all of that.

I've tried looking around for examples of similar problems online but haven't found something that quite does the trick as of yet.]]>

]]>

Code

```
Sub CopyColoredCells()
Application.ScreenUpdating = False
Dim rng As Range, fnd1 As Range, fnd2 As Range, srcWS As Worksheet, desWS As Worksheet
Set srcWS = Sheets("DATA")
Set desWS = Sheets("TEMPLATE")
With srcWS
For Each rng In .Range("C1", .Range("E" & .Rows.Count).End(xlUp))
If rng.Interior.ColorIndex <> xlNone Then
Set fnd1 = desWS.Range("A:A").Find(.Range("A" & rng.Row), LookIn:=xlValues, lookat:=xlWhole)
If Not fnd1 Is Nothing Then
Set fnd2 = desWS.Rows(1).Find(.Cells(1, rng.Column), LookIn:=xlValues, lookat:=xlWhole)
If Not fnd2 Is Nothing Then
desWS.Cells(fnd1.Row, fnd2.Column) = rng
End If
End If
End If
Next rng
End With
Application.ScreenUpdating = True
End Sub
```

Display More