Applying formula when a particular value occurs

S

smurray444

Dear all,

I have a dataset of climatic data grouped by meterological stations an
sorted by ascending years. However, the years which these stations hav
data for are inconsistent.

I would be very grateful if someone could design me a macro which woul
do the following: find each 1990 (year) in the year column (column E
and for the row that this 1990 value occurs, apply the followin
formula to columns F and R: (0.66*50) to columns G and S respectivel
(in the same row). Where 1990 does not occur, blank cells should b
left in columns G and S.

If possible, could you make it clear (if it's not obvious) where in th
macro the '1990' year is referred to, along with the (0.66*50) formula
as I'll need to vary these values in due course.

I hope someone is able to help with this.

Many thanks in advance,
Stev
 
N

Norman Jones

Hi Steve,

Why not autofilter the data, using 1990 as the criterion in column E. Then
select columns F:G and R:S for the extracted records and enter the formula
with Ctrl-Enter.

If you want to automate the process, turn on the macro recorder while you
perform the required steps manually. The resultant code can be edited to
enable more general application.

If you experience problems with such editing, post back with details,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top