AutoHotkey Community

It is currently May 26th, 2012, 10:35 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: September 9th, 2009, 8:44 pm 
I need to transfer data from excel to another excel based off of a common variable. Column A, the common variable is a list of patient names about 200. Column B is a list of numbers that needs to be matched up with the other excel to the patients name. There are some multiple rows of the same name bc of end/restart dates that need to be shown. This isn't that important I can fix this myself. Also there isn't a match for every single number from colum B. I am completly new with script making. Also the rows involved don't start at 1 and aren't A/B with the 2nd sheet. I can give examples of the sheets if needed.


my e-mail is athurman815@gmail.com but I will be checking this site regularly.[/code]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 9:35 pm 
Offline

Joined: September 9th, 2009, 8:33 pm
Posts: 5
I know that MS excel 2007 have these capabilitys but at work I only have excel 2000, once i get the picture of how to transfer data based on the variable I have huge potential in lowering my work load. I have made my own COM scripts that start programs and commands within the browser but I depend too much on the help file and recorder.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 10:54 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6066
Location: San Diego, California
Quote:
but I will be checking this site regularly.[/
Now that you've registered, you can set up your profile to watch a thread and get emails when someone posts :idea:

Have you talked to your boss about this? "patient information" has been in the news, and not in a good way :oops:

have you tried searching the forum for related posts?
also, I use site:autohotkey.com excel in a google search and get a lot of responses.

Using the recorder can be more than just a crutch if you use it right.

I use Excel a lot, but probably less mouse movements than the average person. When I first learned to use a computer, there were no mice!
To do special things like save a file and copy a block of text I learned hotkeys, or the Alt-F-S equivalents.

That said, you can use F5 to open the "goto" dialog box and enter any cell address.
If you name regions of the spreadsheet, you can select whole blocks at a time. If you use F5 to goto a named range, it selects all those cells.

If you hit ctl-c the text of the selected cells is placed on the clipboard, and you can copy the data to a program variable.
Code:
f:=clipboard ;<===== for example
Example #3 shows how to parse the data on the clipboard http://www.autohotkey.com/docs/commands/LoopParse.htm

:wink: Just think what wonderful things you could do if you could get the data from selected columns of an excel spreadsheet into AHK variables :wink:

Here's a link that talks more about excel ranges, maybe other tricks as well.
http://www.accountingweb.co.uk/item/29393


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 7:09 am 
Offline

Joined: September 9th, 2009, 8:33 pm
Posts: 5
I am just using patient last name with their weekly hours. Its just a billing sheet. I want to take the exported data off of quickbooks and enter it into the billing sheet.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 1:16 pm 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Do you know the Excel-function VLOOKUP? It's a MUST for every Excel-User.

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 2:17 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
yes VLOOKUP is definitely the way to go

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 5:20 pm 
Offline

Joined: September 9th, 2009, 8:33 pm
Posts: 5
does Vlookup actually enter data or just check it? i have this,
These are the name columns that need to be compared, but i need some kind of delimiter because sheet 1 names are different bc of -M on the end of their name for Medicaid.

=Sheet1!$A$2:$A$179
='Sheet2'!$D$8:$D$197
which needs to be compared to each other

and =Sheet1!$B$2:$B$179 is the numbers that need to be imported beside each name.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 7:18 pm 
Offline

Joined: September 9th, 2009, 8:33 pm
Posts: 5
=Sheet1!$A$2:$A$179
='Sheet2'!$D$8:$D$197

=VLOOKUP(Sheet1!A2:A179, Sheet2!D8:D197,1,FALSE)

This is not working right, I start the formula in d9 sheet 2 and drag it down and it just copys names starting at row 8 in d8 from sheet 1 instead of comparing A2 etc why is this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 7:36 pm 
Offline

Joined: September 16th, 2008, 7:53 pm
Posts: 77
If the names on sheet 2 match the names on sheet 1, and the names are in column A of sheet 2, a vlookup would work.

On sheet 1, in cell B2, enter the following formula:
=vlookup(A2,'Sheet2'!$A:$D,4,FALSE)

Now copy that formula all the way down to the end of your data on sheet 1, and it should show the numbers you are looking for. If the matching names are in different columns, you would need to tweak the formula slightly.

Remember, when finished you will want to replace the formulas with the actual values by selecting the range, copying it, and then pasting the values directly over the formulas.

Hope this helps.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 7:38 pm 
Offline

Joined: September 16th, 2008, 7:53 pm
Posts: 77
You could post a small sample with some dummy data, that is in the same format, and I will send you back the correct formula.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: JSLover, Miguel, rbrtryn and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group