Is this possible with VLOOKUP ?

TURK

New Member
Joined
Mar 27, 2005
Messages
37
Good day to you all,

I think it's reffered to a VLOOKUP with IF statement.
I've tried a lot of different combinations, but still can't get it to work.

I'm trying to import the data for unpaid jobs from the 2011 tab, to the Unpaid_Jobs tab, sort of, summary, where I can see at a glance which jobs have not been paid.

Would I be correct in saying that, if column 'F' is blank, and there is a '1' in column 'E' ( as I use a '1' to indicate a completed job, and an 'X' for a cancelled job ), that VLOOKUP would import the data in column 'A' ? I would be in the position to see the unpaid job number at a glance. I've been using filters for a while now, but its a bit impracticle.

heres the spreadsheet.

Unpaid_Jobs.xlsx
ABCDEFG
1jobnodatecustomertechcompletepaidref
21234501/02/2011SMITHJOHN150.0010021
31234601/02/2011JONESJOHN190.0010022
41250503/03/2011SIMPSONALLAN1
51440003/04/2011DAVIESJAMES180.0011011
61473204/06/2011CLARKDARREN1
71502204/06/2011STEWARTJAMESX
8
2011
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
What about this code to do the same

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> cpy()<br><SPAN style="color:#00007F">Dim</SPAN> LR <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br><SPAN style="color:#00007F">With</SPAN> Sheets("Sheet4") <SPAN style="color:#007F00">'Change sheet name</SPAN><br>    LR = .Range("A" & Rows.Count).End(xlUp).Row<br>    <SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> LR<br>        <SPAN style="color:#00007F">If</SPAN> .Range("E" & i).Value = 1 And .Range("F" & i).Value = "" <SPAN style="color:#00007F">Then</SPAN> .Rows(i).Copy Destination:=Sheets("Sheet5").Range("A" & Rows.Count).End(xlUp).Offset(1)<br>    <SPAN style="color:#00007F">Next</SPAN> i<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0
Hi Trevor,

I do appreciate the help, and your time. But what the hell is that !?
what am i supposed to do with it. it looks nothing like an excel formula.
I'm a beginner, please be gentle ;)
 
Upvote 0
It is a visual basic program which you would run as a Macro from within the workbook. If you can't deal with this then perhaps hang on to see if someone can provide a formula.
 
Upvote 0
VB is probably the best way for this and Trevor G has already written the code for you.
 
Upvote 0
Thanks for all your help, but if theres no other way to accomplish what I am trying to do, with VLOOKUP, i guess i'll have to learn Macro's ! Do I have to install Visual Basic on my PC ? I'm still learning the basics of formulas, in fact, my spreadsheet already has quite a few formulas in it. will running a macro also, have an effect on the entire workbook ?

TURK.
 
Upvote 0
Good day to you all,

I think it's reffered to a VLOOKUP with IF statement.
I've tried a lot of different combinations, but still can't get it to work.

I'm trying to import the data for unpaid jobs from the 2011 tab, to the Unpaid_Jobs tab, sort of, summary, where I can see at a glance which jobs have not been paid.

Would I be correct in saying that, if column 'F' is blank, and there is a '1' in column 'E' ( as I use a '1' to indicate a completed job, and an 'X' for a cancelled job ), that VLOOKUP would import the data in column 'A' ? I would be in the position to see the unpaid job number at a glance. I've been using filters for a while now, but its a bit impracticle.

heres the spreadsheet.

Unpaid_Jobs.xlsx
ABCDEFG
1jobnodatecustomertechcompletepaidref
21234501/02/2011SMITHJOHN150.0010021
31234601/02/2011JONESJOHN190.0010022
41250503/03/2011SIMPSONALLAN1
51440003/04/2011DAVIESJAMES180.0011011
61473204/06/2011CLARKDARREN1
71502204/06/2011STEWARTJAMESX
8
2011

Do you mean something like this in Column H?

=IF(AND(F3="",E3=1),VLOOKUP(A3,$A$1:$G$6,1,FALSE),"")
 
Upvote 0
Thanks for all your help, but if theres no other way to accomplish what I am trying to do, with VLOOKUP, i guess i'll have to learn Macro's ! Do I have to install Visual Basic on my PC ? I'm still learning the basics of formulas, in fact, my spreadsheet already has quite a few formulas in it. will running a macro also, have an effect on the entire workbook ?

TURK.

Hi TURK,

You don't need to install anything additional. Here are some simple instructions on using VB in Excel.

To use the posted code;
Start the Visual Basic Editor (via Menu Tools, Macro, Visual Basic Editor, or press ALT+F11).
On the Insert menu in the VBE, click Module. (if necessary)
In the module (the white area at the right), paste your code
Note: All Macros start with "Sub MacroName()" and End with "End Sub"

How to create a button and assign a macro to it:
If you don't already have the "Forms" toolbar active, click on Tools>Customize>Toolbars and check "Forms". The toolbar will appear on your screen

Click on the Button icon, and drag out a button on the screen. When you release the left mouse button, an "Assign Macro" dialog box will appear. Highlight whatever macro you want, and click OK. The macro will now be assigned to that button.

You can also run the code by hitting Alt-F8 and selecting the macro name and clicking Run.

Hope that helps,

~ Im2bz2p345 :)
 
Upvote 0

Forum statistics

Threads
1,224,509
Messages
6,179,192
Members
452,893
Latest member
denay

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