Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Urgent Help VBA
Hello,
I need ASAP to transform this function into a VBA macro to finish an existing VBA Macro =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff |
#2
|
|||
|
|||
Hello,
A function is different than a procedure, they are not the same, and that is what you asked for. If you want to know how to *use* the function using VBA, well, why don't you use it just the way it is, using the Evaluate method? Evaluate("=INDEX([VBPA.xls]Sheet1!$D$1:$D$50000,MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*(""BP""=[VBPA.xls]Sheet1!$C$1:$C$50000),0))") (did not test your formula) Just be sure and use double quotes around your text in the formula, single quotes will skew it in VBA. -- Regards, Zack Barresse, aka firefytr, (GT = TFS FF Zack) "Jeff" wrote in message ... Hello, I need ASAP to transform this function into a VBA macro to finish an existing VBA Macro =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff |
#3
|
|||
|
|||
Thank you.
So, can anyone please help me with a VBA procedure that would run this function from row F3 to the next empty row in column "C" =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff "Zack Barresse" wrote: Hello, A function is different than a procedure, they are not the same, and that is what you asked for. If you want to know how to *use* the function using VBA, well, why don't you use it just the way it is, using the Evaluate method? Evaluate("=INDEX([VBPA.xls]Sheet1!$D$1:$D$50000,MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*(""BP""=[VBPA.xls]Sheet1!$C$1:$C$50000),0))") (did not test your formula) Just be sure and use double quotes around your text in the formula, single quotes will skew it in VBA. -- Regards, Zack Barresse, aka firefytr, (GT = TFS FF Zack) "Jeff" wrote in message ... Hello, I need ASAP to transform this function into a VBA macro to finish an existing VBA Macro =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff |
#4
|
|||
|
|||
Okay, I'm confused. Can't you do this by hand? I think it should only take
about 10 seconds or so.. :-? Goto C3, press Ctrl + Down Press Down arrow one more time Press Right arrow 3 times. Hold Shift, click F3 Press Enter once Enter formula Confirm with Ctrl + Enter Am I missing something here... ?? -- Regards, Zack Barresse, aka firefytr, (GT = TFS FF Zack) "Jeff" wrote in message ... Thank you. So, can anyone please help me with a VBA procedure that would run this function from row F3 to the next empty row in column "C" =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff "Zack Barresse" wrote: Hello, A function is different than a procedure, they are not the same, and that is what you asked for. If you want to know how to *use* the function using VBA, well, why don't you use it just the way it is, using the Evaluate method? Evaluate("=INDEX([VBPA.xls]Sheet1!$D$1:$D$50000,MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*(""BP""=[VBPA.xls]Sheet1!$C$1:$C$50000),0))") (did not test your formula) Just be sure and use double quotes around your text in the formula, single quotes will skew it in VBA. -- Regards, Zack Barresse, aka firefytr, (GT = TFS FF Zack) "Jeff" wrote in message ... Hello, I need ASAP to transform this function into a VBA macro to finish an existing VBA Macro =INDEX([VBPA.xls]Sheet1!$D$1:$D$50000, MATCH(1,(INT(D3)=[VBPA.xls]Sheet1!$A$1:$A$50000)*("BP"=[VBPA.xls]Sheet1!$C$1:$C$50000),0)) -- Regards, Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Urgent" use script to share the workbook | Excel Discussion (Misc queries) | |||
Shared Workbook Problem, Urgent | Excel Discussion (Misc queries) | |||
A Sorted Affair - not urgent | Excel Discussion (Misc queries) | |||
Urgent Urgent Urgent!!! | Excel Discussion (Misc queries) | |||
Urgent - How to fix grayed out option under Tools|Options|Chart? | Excel Discussion (Misc queries) |