Counting different rows daily and running a Macro

P

plm11111

I have a datafeed that comes everyday via email , every day the
feed has slighty different rows, as it has different updated products
i.e. somedays 999 , 1001 etc. I need to run a macro so when
the excel file arrives to count the number of rows and then add the
letter "y" in a 3 new columns . At the moment i have to do it
manually,
is this easy to do

Paul
 
B

Bob Phillips

See other post


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
P

plm11111

HI Bob many thanks its saved me lots of time, i do have another column
which at present use the code below.

Would it be possible to do something like that with this , its
basically does the same as what i asked for before it adds
/products_images/ to a path to show the image path correctly depending
on how many rows, the problem is with this at the moment i manually
adjust the range before i play the macro

Pul


For Each cell In ActiveSheet.Range("J1:J1225")
temp1 = cell.Value
cell.Value = "/product_images/" & temp1 & ""
Next
 
J

jirkalla

Hi,
or you can use method CurrentRegion "Range("a1").CurrentRegion.Select" and
then you can set this selection to a Range "Set Rng = Selection" and then
count Rows in this selected Range Rng "CountRows = Rng.Rows.Count" and
display it "MsgBox CountRows" or use it somewhere else.
jirkalla
 
Top