Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default An Excel question

In Cells A1, I am entering the day of the month.

Depending on the value of A1, I want it to mark an X on one of cells B1 to
B31.

e.g. if A1 is the 20th day of the month, I want it to automatically mark
cell B20 with an X.

How do I do that?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default An Excel question

one way:

B1: =IF($A$1=ROW(), "X","")

Copy down to B31.


In article ,
"Ed" wrote:

In Cells A1, I am entering the day of the month.

Depending on the value of A1, I want it to mark an X on one of cells B1 to
B31.

e.g. if A1 is the 20th day of the month, I want it to automatically mark
cell B20 with an X.

How do I do that?

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default An Excel question

Thanks all for your quick replies! All solutions worked out great.

Now, suppose I expand on this. In Cell A2, it indicates the day which is an
OFF DAY.

Then, depending on the value of A2, I want to mark a "Y" on one of the cells
from B1 to B31.

How would I combine the solution from before with this one?

Can I do something like this?
B1: =IF($A$1=ROW(), "X","") or IF($B$1=ROW(), "Y","")


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default An Excel question

Hi Ed
try
=IF($A$1=ROW(), "X",IF($B$1=ROW(), "Y",""))

Frank

Ed wrote:
Thanks all for your quick replies! All solutions worked out great.

Now, suppose I expand on this. In Cell A2, it indicates the day
which is an OFF DAY.

Then, depending on the value of A2, I want to mark a "Y" on one of
the cells from B1 to B31.

How would I combine the solution from before with this one?

Can I do something like this?
B1: =IF($A$1=ROW(), "X","") or IF($B$1=ROW(), "Y","")



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default An Excel question

=Trim(if($A$1=Row(),"X","") & " " & if($A$2=row(),"Y",""))

--
Regards,
Tom Ogilvy

Ed wrote in message
...
Thanks all for your quick replies! All solutions worked out great.

Now, suppose I expand on this. In Cell A2, it indicates the day which is

an
OFF DAY.

Then, depending on the value of A2, I want to mark a "Y" on one of the

cells
from B1 to B31.

How would I combine the solution from before with this one?

Can I do something like this?
B1: =IF($A$1=ROW(), "X","") or IF($B$1=ROW(), "Y","")






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default An Excel question

Just to point out the difference, if A2=A1, Fred's would put an X, while
mine would put X Y

You didn't specify what you wanted in this situation (or if that was
something that could happen).

--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
=Trim(if($A$1=Row(),"X","") & " " & if($A$2=row(),"Y",""))

--
Regards,
Tom Ogilvy

Ed wrote in message
...
Thanks all for your quick replies! All solutions worked out great.

Now, suppose I expand on this. In Cell A2, it indicates the day which

is
an
OFF DAY.

Then, depending on the value of A2, I want to mark a "Y" on one of the

cells
from B1 to B31.

How would I combine the solution from before with this one?

Can I do something like this?
B1: =IF($A$1=ROW(), "X","") or IF($B$1=ROW(), "Y","")






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default An Excel question

In cell B1 type

=IF(DAY($A$1)=ROW(B1),"X","")

Copy it to the range B1 to B31.


"Ed" wrote in message
...
In Cells A1, I am entering the day of the month.

Depending on the value of A1, I want it to mark an X on one of cells B1 to
B31.

e.g. if A1 is the 20th day of the month, I want it to automatically mark
cell B20 with an X.

How do I do that?

Thanks.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default An Excel question

Sub markit()
Cells(Day(Cells(1, 1)), 2) = "X"
End Sub


-----Original Message-----
In Cells A1, I am entering the day of the month.

Depending on the value of A1, I want it to mark an X on

one of cells B1 to
B31.

e.g. if A1 is the 20th day of the month, I want it to

automatically mark
cell B20 with an X.

How do I do that?

Thanks.


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Excel 2003 to Excel 2007 Question Mr. Panasonic Excel Worksheet Functions 0 December 15th 08 06:16 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"