Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default finding and replacing a cell

I need some help. I am working on a schedule.I have 14 different sheets and
each sheet is named in two digit format according to the date. I also have a
hidden sheet named INFO

On the Info sheet I have a column with different initials, and the third row
contains the date also in two digit format.
I can get the initials from the Marco being worked on at the time and I
think I can get the date from the sheet name being worked on
So here is the question. How do I change the cell that corresponds to the
row containing the initials and the column with the date on sheet info. the
date will change and from time to time so will the initials so the area does
not have named ranges but I could do this if that is required I just thought
that might be in the wrong direction.
Any help would be appreciated
Thanks Rod




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default finding and replacing a cell

Rod,

I assume you have a unique combination of Initials and Date.

Simply set up a macro to loop through the initials column, and if it finds
the right initials check the 3rd column right to see if that's the date.

Assumptions:
On sheet info
Row 1 contains headings
Column A contains initials
Column C contains dates

this code is untested, and therefore may need modification
Sub update_info(Initials, date)
' best practice says you should declare the variable type for the passed
parameters
Sheets("Info").activate
range("a2"). select
Do until activecell="" 'initialise
loop and limit looping until blank cell reached
If activecell.value=initials then 'check current
cell to see if it mathces initials
If activecell.offset(0,2).value=date then 'if so, check two
columns right to see if it matches date
...... do what you need to ...... 'execute your
code
exit do '
suspend loop
end if
end if
activecell.offset(1,0).select 'move one cell
down
loop '
because exit do wasn't executed, loop to the top and start again
End sub

Steve


"Rod Taylor" wrote in message
...
I need some help. I am working on a schedule.I have 14 different sheets

and
each sheet is named in two digit format according to the date. I also have

a
hidden sheet named INFO

On the Info sheet I have a column with different initials, and the third

row
contains the date also in two digit format.
I can get the initials from the Marco being worked on at the time and I
think I can get the date from the sheet name being worked on
So here is the question. How do I change the cell that corresponds to the
row containing the initials and the column with the date on sheet info.

the
date will change and from time to time so will the initials so the area

does
not have named ranges but I could do this if that is required I just

thought
that might be in the wrong direction.
Any help would be appreciated
Thanks Rod






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default finding and replacing a cell

Assumptions:
On sheet info
Row 1 contains headings
Column A contains initials
Column C contains dates


Thanks Steve I am working on namming many different ranges to accomplish
this and I like what you sent better but the Problems with the Assumptions
is that
ROW 1 is the dates
column1 contains the initales (actually the initiales start one colmn to the
left of the first date and one row down)

there are headers or headings MONDAY through SATURDAY twice two rows up but
I dont think they can be helpful (S,M,T,W,T,F,S,S,M,T,W,T,F,S)

If you have A suggestion with this I would love it.
I was thinking of using the intersect function but I dont know how to find
out which Range I am in once I find the CELL and I am not sure if I can use
a Varable for a Range NAME.



this code is untested, and therefore may need modification
Sub update_info(Initials, date)
' best practice says you should declare the variable type for the passed
parameters
Sheets("Info").activate
range("a2"). select
Do until activecell="" 'initialise
loop and limit looping until blank cell reached
If activecell.value=initials then 'check

current
cell to see if it mathces initials
If activecell.offset(0,2).value=date then 'if so, check two
columns right to see if it matches date
...... do what you need to ...... 'execute your
code
exit do '
suspend loop
end if
end if
activecell.offset(1,0).select 'move one

cell
down
loop '
because exit do wasn't executed, loop to the top and start again
End sub

Steve


"Rod Taylor" wrote in message
...
I need some help. I am working on a schedule.I have 14 different sheets

and
each sheet is named in two digit format according to the date. I also

have
a
hidden sheet named INFO

On the Info sheet I have a column with different initials, and the third

row
contains the date also in two digit format.
I can get the initials from the Marco being worked on at the time and I
think I can get the date from the sheet name being worked on
So here is the question. How do I change the cell that corresponds to

the
row containing the initials and the column with the date on sheet info.

the
date will change and from time to time so will the initials so the area

does
not have named ranges but I could do this if that is required I just

thought
that might be in the wrong direction.
Any help would be appreciated
Thanks Rod









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
finding and replacing text with a blank Tom Excel Discussion (Misc queries) 2 May 10th 09 12:01 AM
finding and replacing HELPNEEDED!! Excel Worksheet Functions 2 July 3rd 08 01:17 PM
Finding and Replacing Jan Excel Discussion (Misc queries) 3 January 11th 07 05:50 PM
Finding, Replacing and Cut & Paste cs_vision Excel Worksheet Functions 3 April 26th 06 09:23 PM
Finding and Replacing a "?" Mcobra41 Excel Discussion (Misc queries) 2 March 9th 05 06:57 PM


All times are GMT +1. The time now is 03:40 PM.

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

About Us

"It's about Microsoft Excel"