Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatic update of filter | Excel Discussion (Misc queries) | |||
update chart after filter | Charts and Charting in Excel | |||
Advanced Filter - Automatic Update | Excel Worksheet Functions | |||
Advance Filter update | Excel Discussion (Misc queries) | |||
Import filter and update master | Excel Programming |