ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto-populating cells depending on the value of other cells! (https://www.excelbanter.com/excel-programming/342083-auto-populating-cells-depending-value-other-cells.html)

RemySS

Auto-populating cells depending on the value of other cells!
 
Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if cell A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The cells in
column A could have anyhting between AA and AZ, but the corresponding column
B will always have a "Y" depending on which letters are in column A. Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use the help!

PCLIVE

Auto-populating cells depending on the value of other cells!
 
It seems that this could be done using a formula. What is the contents of
cell B1 if it is not "Y"? If it is blank, then you could try this formula.

In Cell B1:
=IF(A1="AA","Y","")

In Cell B2:
=IF(A1="AB","Y","")

HTH,
Paul

"RemySS" wrote in message
...
Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if cell A1
has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The cells in
column A could have anyhting between AA and AZ, but the corresponding
column
B will always have a "Y" depending on which letters are in column A. Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use the
help!




galimi[_2_]

Auto-populating cells depending on the value of other cells!
 
You can use a sheet change event to determine when the contents of cell a1
have changed. You can then determine the results and populate the other
cells according to the results.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"RemySS" wrote:

Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if cell A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The cells in
column A could have anyhting between AA and AZ, but the corresponding column
B will always have a "Y" depending on which letters are in column A. Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use the help!


RemySS

Auto-populating cells depending on the value of other cells!
 
PCLIVE, galimi

yes, B2 could also be blank, which would be the case if there was nothing in
the cell A1. However, could i use the formula provided in a different way,
say if cell A1 could be anything from AA to AZ?

E.g. Column B2 would hav a list of AA-AZ and in the column next to it a Y
could appear depending on what value is entered in cell A1. so if A1 has
"AA", Y would be populated in the column (C) next to the cell in column B
where AA should be listed, and the same for the others?

p.s., thanx for the initial formula!

Galimi, Could you elaborate a bit more on your solution? thanks



"galimi" wrote:

You can use a sheet change event to determine when the contents of cell a1
have changed. You can then determine the results and populate the other
cells according to the results.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"RemySS" wrote:

Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if cell A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The cells in
column A could have anyhting between AA and AZ, but the corresponding column
B will always have a "Y" depending on which letters are in column A. Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use the help!


PCLIVE

Auto-populating cells depending on the value of other cells!
 
Let me see if I got this correct. In column B rows 1 through 26 you have AA,
AB, AC, ect...
In the same row, but in column C, you want a "Y" to appear when it matches
what's in A1?

If that is what you want, then in C1 you could use:

=IF(A$1=B1,"Y","")

Then copy this formula down through row 26.
If this is not what you were looking for, then please elaborate.

Paul


"RemySS" wrote in message
...
PCLIVE, galimi

yes, B2 could also be blank, which would be the case if there was nothing
in
the cell A1. However, could i use the formula provided in a different way,
say if cell A1 could be anything from AA to AZ?

E.g. Column B2 would hav a list of AA-AZ and in the column next to it a Y
could appear depending on what value is entered in cell A1. so if A1 has
"AA", Y would be populated in the column (C) next to the cell in column B
where AA should be listed, and the same for the others?

p.s., thanx for the initial formula!

Galimi, Could you elaborate a bit more on your solution? thanks



"galimi" wrote:

You can use a sheet change event to determine when the contents of cell
a1
have changed. You can then determine the results and populate the other
cells according to the results.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"RemySS" wrote:

Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if cell
A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The cells
in
column A could have anyhting between AA and AZ, but the corresponding
column
B will always have a "Y" depending on which letters are in column A.
Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use
the help!




RemySS

Auto-populating cells depending on the value of other cells!
 
Thanks for replying PCLIVE,

Table 1
A B C D
1 AB - AA
2 AC AB Y
3 AF AC Y

Basically, column C lists AA to AZ (these will remain the same), and A is
chosen by the user. This coumn could have any of the letters in any order.
When, for example, AB is entered into cell A1, a Y should go in D2 (which is
next to the constant AB in C2). If though, (refer to table 2) AC is entered
into cell A1, then A Y should go in cell D3 instead.

Table 2
A B C D
1 AC AA Y
2 AL AB
3 AD AC Y
4 AA AD Y

I apologise for not clarifying it before, hopefully that explains it better.
I would be grateful for any help towards this as it would speed up my
processes greatly.

Thanks in Advance!

"PCLIVE" wrote:

Let me see if I got this correct. In column B rows 1 through 26 you have AA,
AB, AC, ect...
In the same row, but in column C, you want a "Y" to appear when it matches
what's in A1?

If that is what you want, then in C1 you could use:

=IF(A$1=B1,"Y","")

Then copy this formula down through row 26.
If this is not what you were looking for, then please elaborate.

Paul


"RemySS" wrote in message
...
PCLIVE, galimi

yes, B2 could also be blank, which would be the case if there was nothing
in
the cell A1. However, could i use the formula provided in a different way,
say if cell A1 could be anything from AA to AZ?

E.g. Column B2 would hav a list of AA-AZ and in the column next to it a Y
could appear depending on what value is entered in cell A1. so if A1 has
"AA", Y would be populated in the column (C) next to the cell in column B
where AA should be listed, and the same for the others?

p.s., thanx for the initial formula!

Galimi, Could you elaborate a bit more on your solution? thanks



"galimi" wrote:

You can use a sheet change event to determine when the contents of cell
a1
have changed. You can then determine the results and populate the other
cells according to the results.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"RemySS" wrote:

Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if cell
A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The cells
in
column A could have anyhting between AA and AZ, but the corresponding
column
B will always have a "Y" depending on which letters are in column A.
Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use
the help!





PCLIVE

Auto-populating cells depending on the value of other cells!
 
Ok, I think I understand.
In D1 try this formula and then copy down as needed.

=IF(COUNTIF(A:A,C1)0,"Y","")

Best Regards,
Paul

"RemySS" wrote in message
...
Thanks for replying PCLIVE,

Table 1
A B C D
1 AB - AA
2 AC AB Y
3 AF AC Y

Basically, column C lists AA to AZ (these will remain the same), and A is
chosen by the user. This coumn could have any of the letters in any order.
When, for example, AB is entered into cell A1, a Y should go in D2 (which
is
next to the constant AB in C2). If though, (refer to table 2) AC is
entered
into cell A1, then A Y should go in cell D3 instead.

Table 2
A B C D
1 AC AA Y
2 AL AB
3 AD AC Y
4 AA AD Y

I apologise for not clarifying it before, hopefully that explains it
better.
I would be grateful for any help towards this as it would speed up my
processes greatly.

Thanks in Advance!

"PCLIVE" wrote:

Let me see if I got this correct. In column B rows 1 through 26 you have
AA,
AB, AC, ect...
In the same row, but in column C, you want a "Y" to appear when it
matches
what's in A1?

If that is what you want, then in C1 you could use:

=IF(A$1=B1,"Y","")

Then copy this formula down through row 26.
If this is not what you were looking for, then please elaborate.

Paul


"RemySS" wrote in message
...
PCLIVE, galimi

yes, B2 could also be blank, which would be the case if there was
nothing
in
the cell A1. However, could i use the formula provided in a different
way,
say if cell A1 could be anything from AA to AZ?

E.g. Column B2 would hav a list of AA-AZ and in the column next to it a
Y
could appear depending on what value is entered in cell A1. so if A1
has
"AA", Y would be populated in the column (C) next to the cell in column
B
where AA should be listed, and the same for the others?

p.s., thanx for the initial formula!

Galimi, Could you elaborate a bit more on your solution? thanks



"galimi" wrote:

You can use a sheet change event to determine when the contents of
cell
a1
have changed. You can then determine the results and populate the
other
cells according to the results.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"RemySS" wrote:

Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if
cell
A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The
cells
in
column A could have anyhting between AA and AZ, but the
corresponding
column
B will always have a "Y" depending on which letters are in column A.
Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use
the help!







RemySS

Auto-populating cells depending on the value of other cells!
 
Excellent!!! Thanks Paul, you've saved me a lot of time and work! : )

"PCLIVE" wrote:

Ok, I think I understand.
In D1 try this formula and then copy down as needed.

=IF(COUNTIF(A:A,C1)0,"Y","")

Best Regards,
Paul

"RemySS" wrote in message
...
Thanks for replying PCLIVE,

Table 1
A B C D
1 AB - AA
2 AC AB Y
3 AF AC Y

Basically, column C lists AA to AZ (these will remain the same), and A is
chosen by the user. This coumn could have any of the letters in any order.
When, for example, AB is entered into cell A1, a Y should go in D2 (which
is
next to the constant AB in C2). If though, (refer to table 2) AC is
entered
into cell A1, then A Y should go in cell D3 instead.

Table 2
A B C D
1 AC AA Y
2 AL AB
3 AD AC Y
4 AA AD Y

I apologise for not clarifying it before, hopefully that explains it
better.
I would be grateful for any help towards this as it would speed up my
processes greatly.

Thanks in Advance!

"PCLIVE" wrote:

Let me see if I got this correct. In column B rows 1 through 26 you have
AA,
AB, AC, ect...
In the same row, but in column C, you want a "Y" to appear when it
matches
what's in A1?

If that is what you want, then in C1 you could use:

=IF(A$1=B1,"Y","")

Then copy this formula down through row 26.
If this is not what you were looking for, then please elaborate.

Paul


"RemySS" wrote in message
...
PCLIVE, galimi

yes, B2 could also be blank, which would be the case if there was
nothing
in
the cell A1. However, could i use the formula provided in a different
way,
say if cell A1 could be anything from AA to AZ?

E.g. Column B2 would hav a list of AA-AZ and in the column next to it a
Y
could appear depending on what value is entered in cell A1. so if A1
has
"AA", Y would be populated in the column (C) next to the cell in column
B
where AA should be listed, and the same for the others?

p.s., thanx for the initial formula!

Galimi, Could you elaborate a bit more on your solution? thanks



"galimi" wrote:

You can use a sheet change event to determine when the contents of
cell
a1
have changed. You can then determine the results and populate the
other
cells according to the results.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"RemySS" wrote:

Hey all,

Does anyone know the code to auto-populate cell B1 with a "Y" if
cell
A1 has
"AA" in it, and cell B2 with a "Y" if cell A1 has "AB" in it? The
cells
in
column A could have anyhting between AA and AZ, but the
corresponding
column
B will always have a "Y" depending on which letters are in column A.
Make
sense?! Sorry if its rather ambiguous, I'm crap at VBA and could use
the help!








All times are GMT +1. The time now is 07:35 AM.

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