VBA, Match, Date, XLCutcopy, check if Exists, For Each c in range etc.

jvdherik010

New Member
Joined
Dec 30, 2016
Messages
13
Hi guys,

I really need your help with my project, because i am stuck..

first, here is the link to my example file:
https://www.dropbox.com/s/9vkh8y5w30le6r2/Map1.xlsx?dl=0

What i want to accomplish is. (just write it down what is logical for me tho:))

1st issue:
Code:
with <code>Sheets("Start")</code>
     X =  <code>.Range("B").End(xlDown).Row
   Y =<code> </code>.Cells(2, .Columns.count).End(XLtoleft).column
</code>for each cell in X and Y
if Cell match one of the cells in sheets("Dictonairy").range("A1;A")then
XlCopy   [U]cells(1,)and cell.value [/U](not the entire row) to
<code>Sheets("Can be Done").Range("A").End(xlDown).Row</code>  (and B and C etc. if needed)

else
<code></code>

if Cell [U]not[/U] matched one of the cells in sheets("Dictonairy").range("A1;A")then
cell.value -> <code>Sheets("Dictonairy").Range("A").End(xlDown).Row
&</code>
XlCopy   cells(1,)  and cell.value (not the entire row) to
<code>Sheets("Can not be Done").Range("A").End(xlDown).Row</code><code>

but! just like in my sheet, outcome must be

[B][U]Name13      FCN******     FID****[/U][/B]

so not

Name13
FCN***
FID***

or
Name13     FCN***
           FID****
</code>
<code><code></code> <code></code>
</code>
2nd Issue:
Code:
with <code>Sheets("can be done")
     X =  <code>.Range("B").End(xlDown).Row
   Y =<code> </code>.Cells(2, .Columns.count).End(XLtoleft).column
</code></code>for each cell in X and Y<code>vlookup = vlookup(cell, dictonairy, 3, false)
if vlookup of .cell <= Date of today -(minus) 7days
</code>then
do nothing

elseif <code> vlookup of .cell >= Date of today -(minus) 7days</code>XlCopy   cells(1,)  and cell.value (not the entire row) to
<code>Sheets("Can not be Done").Range("A").End(xlDown).Row

<code>but! just like in my sheet, outcome must be

[B][U]Name13      FCN******     FID****[/U][/B]

so not

Name13
FCN***
FID***

or
Name13     FCN***
           FID****</code></code>

basically i need to have a double check. first if the code exist inthe dictonairy, and second to check if the date is not expiring.

because if the date is expiring then its not valid anymore. so want to have this removed automatically when the date is to old.
so then the 1ste code will work again, so then there is nothing in the dictonairy, so will add that cell when not found.
and add the name and cheked cell in can not be done.


thanks so much for your thinking and help..
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,215,615
Messages
6,125,857
Members
449,266
Latest member
davinroach

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