ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set cell value based upon another cell (https://www.excelbanter.com/excel-programming/293229-set-cell-value-based-upon-another-cell.html)

GARY

Set cell value based upon another cell
 
Hi All

I want to set the value of a cell based upon the value in
another cell.

ie if cell a1 = '1' then cell b1 = 'Y'
if cell a2 = '21' then leave cell b2 as a2 is not 1

Any assistance would be appreciated.

Thanks


Frank Kabel

Set cell value based upon another cell
 
Hi Gary
a non VBA solution: enter the following in B1:
=IF(A1=1,"Y","")
and copy down

--
Regards
Frank Kabel
Frankfurt, Germany

Gary wrote:
Hi All

I want to set the value of a cell based upon the value in
another cell.

ie if cell a1 = '1' then cell b1 = 'Y'
if cell a2 = '21' then leave cell b2 as a2 is not 1

Any assistance would be appreciated.

Thanks


Max

Set cell value based upon another cell
 
Assuming you want blanks to be returned as the value_if_false:

Put in B1: =IF(A1=1,"Y","")
Copy B1 down

[Alternatively, put in B1: =IF(A1<1,"","Y")]

--
Rgds
Max
xl 97
---
Please respond, in newsgroup
xdemechanik <atyahoo<dotcom
----
"Gary" wrote in message
...
Hi All

I want to set the value of a cell based upon the value in
another cell.

ie if cell a1 = '1' then cell b1 = 'Y'
if cell a2 = '21' then leave cell b2 as a2 is not 1

Any assistance would be appreciated.

Thanks




pikus

Set cell value based upon another cell
 
Put this in cell B1:

=IF(A1=1,"Y","")

This only works if you want column B's cells to be blank if the valu
in column A is "1". Otherwise you'll have to ammend the formula lik
this:

=IF(A1=1,"Y","N")

- Piku

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:56 AM.

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