![]() |
#1
|
|||
|
|||
![]() Could some one help me, I have two sheets, first have values (transfer finished, company, invoice No, values in usd, eur). In second I need some formula to look is the transfer finished for some company, and if it is find all values for that company (invoice No, values in usd, eur) and fill all row (like in screenshot). Thank in andvanced |
#2
|
||||
|
||||
![]()
Will using filters accomplish what you want?
|
#3
|
|||
|
|||
![]()
Thank you for your quick replay, but I need to filter data with some formula from first into second sheet.
|
#4
|
|||
|
|||
![]()
I could put in third sheet list of all company and "yes" and "no" to help build formula in second sheet.
|
#5
|
|||
|
|||
![]()
Here is a macro method. Paste this macro into a Routine Module. Run from Command Button on Sheet 1 :
Code:
Option Explicit Sub CopyYes() Dim c As Range Dim j As Integer Dim Source As Worksheet Dim Target As Worksheet Dim myString As String ' Change worksheet designations as needed Set Source = ActiveWorkbook.Worksheets("Sheet1") Set Target = ActiveWorkbook.Worksheets("Sheet2") myString = Application.InputBox("Enter A Search Term") j = 2 ' Start copying to row 1 in target sheet For Each c In Source.Range("B1:B1000") ' Do 1000 rows If c = myString Then Source.Rows(c.Row).Copy Target.Rows(j) j = j + 1 End If Next c End Sub |
#6
|
|||
|
|||
![]()
Thank you Logit, you save me
|
#7
|
|||
|
|||
![]()
.
You are welcome. Glad to help. |
#8
|
|||
|
|||
![]()
Somehow my post having attached excel file with a possible solution from Friday disappeared. Probably I'm late now, but here it is again (differently from Friday's version, I changed the file format to xlsm and added an Open event to update the query connection string and query text string whenever the file is moved or renamed).
|
#9
|
|||
|
|||
![]()
Sorry! I forgot to attach the file!
|
#10
|
|||
|
|||
![]()
Thank you your reply, but I have problem with excel document (I receive message " is not a valid path.make sure that the path name is correctly written and that you are connected on the server on which files are located.
|
#11
|
||||
|
||||
![]()
@Allex
Hello as you might suspect, the title of a thread is very important : - for you because the more descriptive it is, the higher the chance you have to get help from one or many members. Most of us usually only check thread titles to see if the subject is part of our knowledge. You will admit that " Please help" does not really " help". - for others because when the thread is solved, they can profit from the answer to solve their own problems. The thread title can also be searched on the Net. You will admit that " please help" will not be searched for very often... So, I would suggest, so that all can benefit from it that you change your thread title to something more descriptive. To do this edit your first post, click " go advanced" and there you can change your title accordingly. Thanks
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#12
|
|||
|
|||
![]() Quote:
You can open the file anyway when you get ODBC error - simply click Cancel for error messages. Then you must save the file into folder accessible from your computer (to hard disk, or to network resource - ODBC query reads info from the last save of file, not from instance you are working with). After that close the file and open again - When no error massages anymore, then all is OK. When you get same error anyway, then check security settings (for macros and external connections). When you anyway can't get the Open event or query working properly, then the last option is to edit connection manually (from menu: Data>Connections select connection, activate Properties, on tab Definition edit file path in Connection string and Command text.) As the query reads data from save, when you enter some new transfers and want to see them in report, you have to save the file before refreshing the report. The report is refreshed, whenever: 1. you open the file; 2. you click on Refresh All in Connections section of data menu; 3. you click on Refresh button in Workbook Connections wizard with connection selected; 4. you right-click on any cell of query's datarange on report sheet, and select Refresh from drop-down menu; 5. You select another company or Finished status on report sheet. |
![]() |
|