ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do create a formula (https://www.excelbanter.com/excel-programming/422326-how-do-create-formula.html)

RJSads

how do create a formula
 
I have 2 columns in a worksheet #1
Column 1 Client Code
Cloumn 2 Client Type


In Worksheet #2 i have the same columns

If i populate Column 1 in worksheet #2 with a client Code how do i input the
Client Type based on the information in Worksheet #1

Thanks



Bernie Deitrick

how do create a formula
 
If they are the same columns (say, A and B) on each sheet:

With Worksheets("Worksheet #2")
..Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 2)).FormulaR1C1 = _
"=VLOOKUP(RC[-1],'Worksheet #1'!C[-1]:C,2,FALSE)"
End With

HTH,
Bernie
MS Excel MVP


"RJSads" wrote in message
...
I have 2 columns in a worksheet #1
Column 1 Client Code
Cloumn 2 Client Type


In Worksheet #2 i have the same columns

If i populate Column 1 in worksheet #2 with a client Code how do i input the
Client Type based on the information in Worksheet #1

Thanks






All times are GMT +1. The time now is 06:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com