Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I feel so dumb - please help - this is a Range issue
I've written a macro to do some suttle things - I'm not a pro by any means
but can get by. I have data that is refreshed twice a month and I need to add several steps to it. For one: Col A contains Dates Col B contains Later Dates Col C needs to subtract Col A from Col B I can't just copy the code =imsub(A:A,B:B) becasue it all varies I've tried Nameing the Ranges, I've tried all sorts of stuff until I'm blue - you would think that it would just hit me over the head what I need to do - but it's not. If anyone can save my sanity (I've said the Serenity Prayer one too many times today) I would so appreciate it. Thanks Cat |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I feel so dumb - please help - this is a Range issue
oh - and I AM a knucklehead - it should be Col B subtracts Col A to get the
days 2/5/2007-2/2/2007 Send me to my room "Cat" wrote: I've written a macro to do some suttle things - I'm not a pro by any means but can get by. I have data that is refreshed twice a month and I need to add several steps to it. For one: Col A contains Dates Col B contains Later Dates Col C needs to subtract Col A from Col B I can't just copy the code =imsub(A:A,B:B) becasue it all varies I've tried Nameing the Ranges, I've tried all sorts of stuff until I'm blue - you would think that it would just hit me over the head what I need to do - but it's not. If anyone can save my sanity (I've said the Serenity Prayer one too many times today) I would so appreciate it. Thanks Cat |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I feel so dumb - please help - this is a Range issue
How about:
Sub cat() nq = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To nq Cells(i, 3).Value = Cells(i, 2).Value - Cells(i, 1).Value Next End Sub with sample results in cols A & B & C: 5/16/2007 5/31/2007 15 4/1/2007 6/3/2007 63 4/11/2007 4/21/2007 10 -- Gary''s Student - gsnu200726 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I feel so dumb - please help - this is a Range issue
Thank you for answering my plea - I'll try that - tomorrow - My head hurts
now :( Cat "Gary''s Student" wrote: How about: Sub cat() nq = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To nq Cells(i, 3).Value = Cells(i, 2).Value - Cells(i, 1).Value Next End Sub with sample results in cols A & B & C: 5/16/2007 5/31/2007 15 4/1/2007 6/3/2007 63 4/11/2007 4/21/2007 10 -- Gary''s Student - gsnu200726 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
I feel so dumb - please help - this is a Range issue
Advil
Don't become discouraged. -- Gary''s Student - gsnu200726 "Cat" wrote: Thank you for answering my plea - I'll try that - tomorrow - My head hurts now :( Cat "Gary''s Student" wrote: How about: Sub cat() nq = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To nq Cells(i, 3).Value = Cells(i, 2).Value - Cells(i, 1).Value Next End Sub with sample results in cols A & B & C: 5/16/2007 5/31/2007 15 4/1/2007 6/3/2007 63 4/11/2007 4/21/2007 10 -- Gary''s Student - gsnu200726 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I feel like an idiot (restore unsaved document?) | Excel Discussion (Misc queries) | |||
I FEEL AS IF MY BRAIN IS A CIRCULAR REFERENCE! | Excel Worksheet Functions | |||
replicate feel of checkbox | Excel Discussion (Misc queries) | |||
How to make cel feel like word doc | Setting up and Configuration of Excel |