ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hot get a cell value in varable (https://www.excelbanter.com/excel-programming/418207-hot-get-cell-value-varable.html)

mayank

hot get a cell value in varable
 
excel does not support more than seven nested if statements and i have around
20 unique values on which bases i have to fill other filed . for this i want
to use case statement in visual basic but unable to get the cell value in a
variable if any other option

DMoney

hot get a cell value in varable
 
you should first consider the data type.

i chose variant as it is most compatable


dim yourval as variant
yourval=range("a1") ---substitute a1 for the cell reference you want passed.


"mayank" wrote:

excel does not support more than seven nested if statements and i have around
20 unique values on which bases i have to fill other filed . for this i want
to use case statement in visual basic but unable to get the cell value in a
variable if any other option



All times are GMT +1. The time now is 04:19 PM.

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