how could copy the value from E to F

tomy_xx

New Member
Joined
Jun 15, 2022
Messages
20
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
How could i search if value matches in column B , take a copy of next value in
1655314025780.png
column E and put it into another cell.
 
Ok what about second part
Infopro Report.xlsx
ABCDEFG
1PARTITIONNON JOB
2
3INFOPRO_INFOPROAU BRMS_DUP_J 411702/QSECOFR/BRMS_DUP_J
4 CPF1124Travail 411702/QSECOFR/BRMS_DUP_J démarré le 15/06/22 à 05:00:00 dans le sous-système QCTL de QSYS ; soumis le 15/06/22 à 05:00:00.
5 CPI671FCartouche IFP046 volume IFP046 montée sur l unité TAPMLB04.
6 CPF1164Travail 411702/QSECOFR/BRMS_DUP_J arrêté le 15/06/22 à 05:42:53; temps UC 17,271; code fin 0 .
7INFOPRO_INFOPROFI TRTQUOTDUP 423839/DFIBACKUP/TRTQUOTDUP
8 CPF1124Travail 423839/DFIBACKUP/TRTQUOTDUP démarré le 15/06/22 à 04:00:00 dans le sous-système DFI_1BY1 de DFI_ENV ; soumis le 15/06/22 à 04:00:00.
9 CPD2639Unité TAPMLB01 déjà en fonction.
10 CPD2639Unité TAPVRTBRMS déjà en fonction.
11 CPI671FCartouche IFP010 volume IFP010 montée sur l unité TAPMLB01.
12 CPF1164Travail 423839/DFIBACKUP/TRTQUOTDUP arrêté le 15/06/22 à 05:17:04; temps UC 25,803; code fin 0 .
13INFOPRO_INFOPROAU BRMS_DUP_J 411702/QSECOFR/BRMS_DUP_J
14 CPF1124Travail 411702/QSECOFR/BRMS_DUP_J démarré le 15/06/22 à 05:00:00 dans le sous-système QCTL de QSYS ; soumis le 15/06/22 à 05:00:00.
15 CPI671FCartouche IFP046 volume IFP046 montée sur l unité TAPMLB04.
16 CPF1164Travail 411702/QSECOFR/BRMS_DUP_J arrêté le 15/06/22 à 05:42:53; temps UC 17,271; code fin 0 .
17INFOPRO_INFOPROFI TRTQUOTDUP 423839/DFIBACKUP/TRTQUOTDUP
18 CPF1124Travail 423839/DFIBACKUP/TRTQUOTDUP démarré le 15/06/22 à 04:00:00 dans le sous-système DFI_1BY1 de DFI_ENV ; soumis le 15/06/22 à 04:00:00.
19 CPD2639Unité TAPMLB01 déjà en fonction.
20 CPD2639Unité TAPVRTBRMS déjà en fonction.
21 CPI671FCartouche IFP010 volume IFP010 montée sur l unité TAPMLB01.
22 CPF1164Travail 423839/DFIBACKUP/TRTQUOTDUP arrêté le 15/06/22 à 05:17:04; temps UC 25,803; code fin 0 .
Dupli
as you can see B column have values , i want to search in this column for a matched value. if found matches copy the next cell value in column D and paste it in another cell. how i could do that although column B have a repeated values
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
as you can see B column have values , i want to search in this column for a matched value. if found matches copy the next cell value in column D and paste it in another cell. how i could do that although column B have a repeated values
I am still waiting for you to show a detailed example of what you mean, with specific values, cells and cell addresses ("copy to another cell" is not specific).
I want you to explain it, in plain English walking through each step of the example, as if you were presenting it to a group of people to show how it works.
(Posting images and generic explanations is not helping me understand it).

Be sure to explain how you know which value to search for, and where EXACTLY you want this result pasted.
 
Upvote 0
simply i want a condition for the first and second and third matches in column. taking into consideration that this column have a duplicated values as i showed you in screen shot
 
Upvote 0
this condition if found match in the column print the next value in row that have the matches.
 
Upvote 0
Matches to what?
Where is it determined what value you are looking for/matching to?

I have asked you multiple times to walk me through an actual example, explaining it in detail instead of providing very general statements, but you do not seem to want to do that.
You need to help us to help you by answering out questions and giving us what we ask for.
I am not going to ask anymore. If you won't do what I have asked you for (multiple times now), I am not able to help you.
 
Upvote 0
check that

Sub Regex_Job_Name()

Dim i As Integer

Dim Regex As New RegExp
Dim matches As Object
Dim result As String
Dim inputstring As String
Dim matchresult As MatchCollection
Dim item As Variant
Dim lr As Long, r As Long
lr = cells(Rows.Count, "A").End(xlUp).Row

For r = 1 To 20



With Regex
.Global = True
.pattern = "(BRMS)[_A-Z]+"


End With

For i = 2 To 20


Set matchresult = Regex.Execute(ThisWorkbook.Sheets("Dupli").Range("C" & i).Value)

For Each item In matchresult
result = item

Next item

ThisWorkbook.Sheets("Dupli").Range("D" & i).Value = result

result = ""
Next i

If ThisWorkbook.Sheets("Dupli").Range("B" & r).Value = "CPF1164" Then

ThisWorkbook.Sheets("Dupli").Range("C30").Value = ThisWorkbook.Sheets("Dupli").Range("C" & r).Value
End If
Next r



End Sub
 
Upvote 0
it gives me the last marked one instead of the first, so i want to get the first the the second then the third values.
 
Upvote 0
Can you please show me two images, complete with column and row number (so I can see clearly where everything resides), of your data range A1:F30?

Image 1 should be your original data, before you do run any of this code on it.
Image 2 should be your desired output, what you want that data to look like AFTER the code has run.

I want to see the before/after images so I can see exactly what it is you expect to see when it is done.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top