Problem with formula PROCV

jgalas

Board Regular
Joined
Jul 4, 2011
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
Hello

My worksheet have several tables named: table1, tables2, tables3,...
the number # of the table depende on data in cell AF5(1,2,3,4,...)
I want, using the IF control, put in the formula PROCV(a1;table#;2) the right table name.

Anyone can help me with this...

Thanks
 
Re: Problem with formula VLOOKUP

This is how you might use INDIRECT, but I can't guarantee this will work - perhaps you could tell us more about what you are trying to do.

Anyway here it is:

INDIRECT(HLOOKUP(AF5;Folha;IF(AE5="CLC";2;IF(AE5="CP";3;IF(AE5="STC";4;"")))))

If the HLOOKUP returns a valid name then that should return a reference to it.

By the way in the VLOOKUP why do you have the ="c" part?

HLOOKUP(AF5;Folha;IF(AE5="CLC";2;IF(AE5="CP";3;IF(AE5="STC";4;""))))="c"


Thanks a lot


=IF(VLOOKUP($AF$2;HLOOKUP(AF5;Folha;IF($AE$5="CLC";2;IF($AE$5="CP";3;IF($AE$5="STC";4;""))));4)="c";"X";"")

Condition is ="c" in green the tabel name for VLOOKUP
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Re: Problem with formula VLOOKUP

Oh, I get it now.

Think I was confused by all those brackets and the ; separator.:)
 
Upvote 0
Re: Problem with formula VLOOKUP

It dont work i still have a #value! error

:(


Sorry... since my excel is in other language i forgot to charge every instruction

IT WORK PROPELY.
THANKS a lot
 
Upvote 0
Hi jgalas,

Seeing your OP i *suspect* ;) you are using an Excel portuguese-version.

So to post your formulas in english, or to translate to portuguese a formula in english, you can use the macros below (the names are self explanatory)

Code:
Sub YOURLANGUAGEtoENG()
    ActiveCell.Offset(1, 0) = "'" & ActiveCell.Formula
End Sub
 
Sub ENGtoYOURLANGUAGE()
    ActiveCell.Offset(1, 0) = ActiveCell.Formula
End Sub

-English to Portuguese
Copy from the forum and paste in one cell, inside the formula-bar, putting an apostrophe in front of the formula
Select the cell and run the second macro. You'll see the translation in the cell below.

-Portuguese to English
Select the cell with the formula and run the first macro.

(These macros can be used in any language)

Insert them in your Personal workbook and them will be always available.

HTH

M.
 
Last edited:
Upvote 0
Hi jgalas,

Seeing your OP i *suspect* ;) you are using an Excel portuguese-version.

So to post your formulas in english, or to translate to portuguese a formula in english, you can use the macros below (the names are self explanatory)

Code:
Sub YOURLANGUAGEtoENG()
    ActiveCell.Offset(1, 0) = "'" & ActiveCell.Formula
End Sub
 
Sub ENGtoYOURLANGUAGE()
    ActiveCell.Offset(1, 0) = ActiveCell.Formula
End Sub
-English to Portuguese
Copy from the forum and paste in one cell, inside the formula-bar, putting an apostrophe in front of the formula
Select the cell and run the second macro. You'll see the translation in the cell below.

-Portuguese to English
Select the cell with the formula and run the first macro.

(These macros can be used in any language)

Insert them in your Personal workbook and them will be always available.

HTH

M.

You ar rigth Marcelo, i'm using the portuguese version.... ;)

Thank for the tip.

I'll use it next time, couse for now my problem it's resoved.

Thanks a lot
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,334
Members
452,907
Latest member
Roland Deschain

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