Question on what I think is IF function!!

rallynut

New Member
Joined
Jan 25, 2005
Messages
6
:eek: I am trying to get 2 spreadsheets to link together but I only want certain information from the first to be transferred to the second - my biggest problem is that I am using text.

for example, In the first spreadsheet I would like to copy the whole of row 1 only if cell C1 contains the letters HFL. If these letters are anything else then I don't want that row copied...

Can anyone help?!! :rolleyes: :pray:
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi Rallynut, Welcome to the board !

Are you using formula to copy this data or VBA Code ?

With a formula, you can use a simple if statement.

In cell A1 of the NEW spreadsheet type . .

=IF('[filename.xls]Sheet1'!$A$3="HFL",'[filename.xls]Sheet1'!A1,0)

. . then drag this accross the row with the fill handle.

NOTE - Replace "filename" and sheet1 with the relevant info from your source file.

HTH
Bob
 
Upvote 0
Hi Bob,

Thanks for your reply, I have been using formula as I wouldn't recognise VBA code if it hit me over the head!!

I'll try your solution and get back...
 
Upvote 0
Hi Bob,

I'm not sure if I'm doing something wrong here but I have tried it and no joy...

I just get #name?

Do you have a VBA solution - I'm willing to try anything! :oops:
 
Upvote 0
How do I post a sample?

I thought I had it cracked thanks to Bob, but when I copy the cells across, if I take out the dollar signs it only recognises cell A3 for example instead of checking column 3 on each row for the letters and if I leave them in I can't copy across!!!! Help!!
 
Upvote 0
RN,

You need to keep the dollar signs in mate, but like this A$3 rather than the absolute reference ($A$3) I gave you initially.

Try that.

To post a sample, look at the pinned topics at the top of the forum. In particular . .

HTML Maker FAQ (How to show your sheet on the board)


Bob
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,104
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top