Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

Hi
If i use a filter i maybe ahve 200 records and when i use my filter i have
10 records
the value in this cells are maybe 100 then i want this cells value to be
the cells value +10

Hope someone understand and can help

regards
alvin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Update cells, from a filter

After filtering, put the value 10 in another cell and copy it. Then select
the visible cells that you want to update, goto EditPasteSpecial and click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i have
10 records
the value in this cells are maybe 100 then i want this cells value to be
the cells value +10

Hope someone understand and can help

regards
alvin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then select
the visible cells that you want to update, goto EditPasteSpecial and click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i have
10 records
the value in this cells are maybe 100 then i want this cells value to be
the cells value +10

Hope someone understand and can help

regards
alvin




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Update cells, from a filter

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then

select
the visible cells that you want to update, goto EditPasteSpecial and

click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i

have
10 records
the value in this cells are maybe 100 then i want this cells value to

be
the cells value +10

Hope someone understand and can help

regards
alvin






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then

select
the visible cells that you want to update, goto EditPasteSpecial and

click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i

have
10 records
the value in this cells are maybe 100 then i want this cells value to

be
the cells value +10

Hope someone understand and can help

regards
alvin








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Update cells, from a filter

Dim rng as Range, rng1 as Range
set rng = activesheet.Autofilter.Range
set rng = Intersect(rng,columns(2))
set rng = rng.offset(1,0).Resize(rng.count-1,1)
on error resume next
set rng1 = rng.specialcells(xlvisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
cell.value = cell.value + 10
Next
End if

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote:

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then

select
the visible cells that you want to update, goto EditPasteSpecial and

click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i

have
10 records
the value in this cells are maybe 100 then i want this cells value to

be
the cells value +10

Hope someone understand and can help

regards
alvin






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

Hi tom and thanks

But i get this error
In line:
Set rng = rng.Offset(1, 0).Resize(rng.Count - 1, 1)
It says
Object variable or with block variable not set.
Do i something Wrong?

Alvin


"Tom Ogilvy" wrote:

Dim rng as Range, rng1 as Range
set rng = activesheet.Autofilter.Range
set rng = Intersect(rng,columns(2))
set rng = rng.offset(1,0).Resize(rng.count-1,1)
on error resume next
set rng1 = rng.specialcells(xlvisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
cell.value = cell.value + 10
Next
End if

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote:

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then
select
the visible cells that you want to update, goto EditPasteSpecial and
click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i
have
10 records
the value in this cells are maybe 100 then i want this cells value to
be
the cells value +10

Hope someone understand and can help

regards
alvin






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

Hi tom
its working now
It was because i only have value in one collum (A)
when i try the code with value also in B then the code works
But i use autofilter in A and the code runs in B
so my values in B gets +10 not A ???

Regards
Alvin


"Tom Ogilvy" wrote:

Dim rng as Range, rng1 as Range
set rng = activesheet.Autofilter.Range
set rng = Intersect(rng,columns(2))
set rng = rng.offset(1,0).Resize(rng.count-1,1)
on error resume next
set rng1 = rng.specialcells(xlvisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
cell.value = cell.value + 10
Next
End if

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote:

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then
select
the visible cells that you want to update, goto EditPasteSpecial and
click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i
have
10 records
the value in this cells are maybe 100 then i want this cells value to
be
the cells value +10

Hope someone understand and can help

regards
alvin






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

Forget it all

I can see now how its working !!!!!!!!!!!!!!!!!!!!!!!!!!!

Many thanks

Alvin


"Tom Ogilvy" wrote:

Dim rng as Range, rng1 as Range
set rng = activesheet.Autofilter.Range
set rng = Intersect(rng,columns(2))
set rng = rng.offset(1,0).Resize(rng.count-1,1)
on error resume next
set rng1 = rng.specialcells(xlvisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
cell.value = cell.value + 10
Next
End if

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote:

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it. Then
select
the visible cells that you want to update, goto EditPasteSpecial and
click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my filter i
have
10 records
the value in this cells are maybe 100 then i want this cells value to
be
the cells value +10

Hope someone understand and can help

regards
alvin






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Update cells, from a filter

I used columns(2) as an example - you didn't provide any details in your
original post. If your filter is only one column wide, then you don't even
need the intersect.


--
Regards,
Tom Ogilvy

"alvin Kuiper" wrote in message
...
Forget it all

I can see now how its working !!!!!!!!!!!!!!!!!!!!!!!!!!!

Many thanks

Alvin


"Tom Ogilvy" wrote:

Dim rng as Range, rng1 as Range
set rng = activesheet.Autofilter.Range
set rng = Intersect(rng,columns(2))
set rng = rng.offset(1,0).Resize(rng.count-1,1)
on error resume next
set rng1 = rng.specialcells(xlvisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
cell.value = cell.value + 10
Next
End if

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote:

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in

message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it.

Then
select
the visible cells that you want to update, goto

EditPasteSpecial and
click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in

message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my

filter i
have
10 records
the value in this cells are maybe 100 then i want this cells

value to
be
the cells value +10

Hope someone understand and can help

regards
alvin










  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Update cells, from a filter

Yes yes
Its working fine now thanks

Alvin


"Tom Ogilvy" wrote:

I used columns(2) as an example - you didn't provide any details in your
original post. If your filter is only one column wide, then you don't even
need the intersect.


--
Regards,
Tom Ogilvy

"alvin Kuiper" wrote in message
...
Forget it all

I can see now how its working !!!!!!!!!!!!!!!!!!!!!!!!!!!

Many thanks

Alvin


"Tom Ogilvy" wrote:

Dim rng as Range, rng1 as Range
set rng = activesheet.Autofilter.Range
set rng = Intersect(rng,columns(2))
set rng = rng.offset(1,0).Resize(rng.count-1,1)
on error resume next
set rng1 = rng.specialcells(xlvisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
cell.value = cell.value + 10
Next
End if

--
Regards,
Tom Ogilvy


"alvin Kuiper" wrote:

Yes its working
but its also take the empty cells

I use filter in a collum
but when i select only visible then
i also get the empty cells.

Regards
alvin


"Bob Phillips" skrev:

Use the macro recorder when you do, there's your code.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in

message
...
thanks
But is'n there away to do this in a macro I can use?

Alvin


"Bob Phillips" skrev:

After filtering, put the value 10 in another cell and copy it.

Then
select
the visible cells that you want to update, goto

EditPasteSpecial and
click
the Add box. Exit, and clear the cell with 10 in it.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"alvin Kuiper" wrote in

message
...
Hi
If i use a filter i maybe ahve 200 records and when i use my

filter i
have
10 records
the value in this cells are maybe 100 then i want this cells

value to
be
the cells value +10

Hope someone understand and can help

regards
alvin









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
Automatic update of filter claudia Excel Discussion (Misc queries) 1 June 5th 09 01:13 AM
update chart after filter gixer Charts and Charting in Excel 2 March 31st 09 09:16 PM
Advanced Filter - Automatic Update michael90401 Excel Worksheet Functions 0 June 18th 07 06:00 PM
Advance Filter update SteveT Excel Discussion (Misc queries) 2 April 29th 06 12:14 AM
Import filter and update master Mikeice[_11_] Excel Programming 1 June 3rd 05 01:22 PM


All times are GMT +1. The time now is 02:13 AM.

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"