ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA in Excel (https://www.excelbanter.com/excel-programming/407111-vba-excel.html)

Kevin

VBA in Excel
 

Select a text value from a list of 25 static text values based on a numeric
indicator in another cell, then place that text value in a third cell.

Chip Pearson

VBA in Excel
 
Select a text value from a list of 25 static text values based on a
numeric
indicator in another cell, then place that text value in a third cell.


It this a command? Are you ordering us to do this? You might try putting in
a subject and writing a complete sentence.

Using the worksheet "Sheet1", the following code will return the Nth value
starting at Range A1 where N is in B1 and place that value in cell C1.

With Worksheets("Sheet1")
.Range("C1").Value = .Range("A1")(.Range("B1").Value) ' note periods
before Ranges
End With

--
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group, 1998-2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
USA Central Time (GMT -6:00)



"Kevin" wrote in message
...

Select a text value from a list of 25 static text values based on a
numeric
indicator in another cell, then place that text value in a third cell.



Kevin

VBA in Excel
 
I apologize Chip, noob error...instructions said to be brief and I know you
folks are busy, so I didn't want to waste your time with too much verbiage.

I appreciate the help.

"Chip Pearson" wrote:

Select a text value from a list of 25 static text values based on a
numeric
indicator in another cell, then place that text value in a third cell.


It this a command? Are you ordering us to do this? You might try putting in
a subject and writing a complete sentence.

Using the worksheet "Sheet1", the following code will return the Nth value
starting at Range A1 where N is in B1 and place that value in cell C1.

With Worksheets("Sheet1")
.Range("C1").Value = .Range("A1")(.Range("B1").Value) ' note periods
before Ranges
End With

--
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group, 1998-2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
USA Central Time (GMT -6:00)



"Kevin" wrote in message
...

Select a text value from a list of 25 static text values based on a
numeric
indicator in another cell, then place that text value in a third cell.




All times are GMT +1. The time now is 02:11 PM.

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